index: make `document` be public

So that subclasses can use it.
index: add Window type declaration for `win` variable
index: ensure that passing in `null` for the Range works as expected
Release 0.1.1