Datalog Rewritability of Disjunctive Datalog Programs and its Applications to Ontology Reasoning