Add full subdoc support to Javascript client

'conditional put' or 'put if ref match'?