Electronic structure and magnetic properties of the cubic Laves phase compounds ACo2 (A=Sc, Ti, Zr, Lu and Hf) and ScNi2