RethinkDB as an ESM

Refactored @thelinuxlich's fork adding RethinkDB as an ESM.