Probabilistic Modeling of Deep Features for Out-of-Distribution and Adversarial Detection