Ceramic foams from preceramic polymers