Add full subdoc support to Javascript client

This whole builder pattern is weird; I did add an assert on the delegate, but we should probably refactor all the builder usages to take the delegate as constructor argument -- separate PR, IMO.