Magnetic and electronic properties of RNiO3 (R = Pr, Nd, Eu, Ho and Y) perovskites studied by resonant soft x-ray magnetic powder diffraction