Extending Stratified Datalog to Capture Complexity Classes Ranging from P to QH