Add full subdoc support to Javascript client

Not clear here what 'ops' should contain.