Contrastive Training for Improved Out-of-Distribution Detection