rethinkdb: fix dependencies, simplify build options and add head

Closes #17478.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>