server: refactor rethinkdb connection into Datastore constructor