Closes #583, OTS review by Michel
Merge branch 'next' of github.com:rethinkdb/rethinkdb into next