Provably Safeguarding a Classifier from OOD and Adversarial Samples: an Extreme Value Theory Approach