KnowSafe: Combined Knowledge and Data Driven Hazard Mitigation in Artificial Pancreas Systems