Reduce hard dependencies and casts on QueryImpl

This change removes all QueryImpl casts from DatastoreImpl. There is also a change to the QueryImpl#asList() method not to make a unchecked cast for MorphiaIterator (the log statement is questionable IMO).