Magnetic interactions in NiO at ultrahigh pressure