Al-substitution effects on the magnetic properties of RCo5 (R=Y, Pr, Nd, and Sm)