rethinkdb: fix dependencies, simplify build options and add head