MalProtect: Stateful Defense Against Adversarial Query Attacks in ML-based Malware Detection