Add context parameter to glue/unglue (and hence dollar) methods

It's useful to be able to `glue` to an element that is not (yet) in the context of `document`.

I've tested this locally and it appears to work fine, but I've not been able to write passing tests for this feature: perhaps I'm missing something with the test syntax?

I've commented out the tests for this pull request.