Electronic Structure and Magnetism of AFe2 Compounds with C14 and C15 Laves Structures