Crystal structure and magnetic properties of CoR(BO2)5 (RY, Gd) and NiR(BO2)5 (RNd, Gd)