Add full subdoc support to Javascript client

It doesn't matter since the PatchBuilder is write-only, but I have corrected it.