Equilibrium geometries, magic numbers and electronic structure of small carbon clusters