Magnetic behavior of Laves phase RCo2–xFex (R = Ho, Er) compounds and their hydrides