DCO$^+$, DCN, and N₂D$^+$ reveal three different deuteration regimes in the disk around the Herbig Ae star HD 163296