Superconductivity, magnetism and valence fluctuations in rare earth-transition metal borides