Bonding of NH3, CO, and NO to NiO and Ni-doped MgO: a problem for density functional theory