Realizable $H$-Consistent and Bayes-Consistent Loss Functions for Learning to Defer