Adds s-index stuff to JS api

And replicates existing s-index api tests for JS
Merge branch '602_sindex_api' of github.com:rethinkdb/rethinkdb into 602_sindex_api