Charge disproportionation observed by resonant X-ray scattering at the metal–insulator transition in NdNiO3