Magnetic coupling in amorphous bilayers and sandwiches: (RCo)/Y/(RCo)′ (R: Y, Gd)