Electronic and superconducting properties of silicon and carbon clathrates