Nonresonant inelastic x-ray scattering and energy-resolved Wannier function investigation of d-d excitations in NiO and CoO.