Nuclear-dominated accretion and subluminous supernovae from the merger of a white dwarf with a neutron star or black hole