Biodegradable in situ forming systems and sponge-like implants