First-principles study of electronic structure for the Laves-phase compounds HfFe2 and HfV2