DRYs up some code and uses the generic DatastoreConfigurationError for the memcache datastore