fixes js server primary key generation issue
and uncomments the last blocked test
Merge branch 'ql-refactor' of github.com:rethinkdb/rethinkdb into ql-refactor