require `document` instead of implicit global

The best practices around `global/document` is that you should not just implicitely use the global value called `document`.

You should always require `global/document`. This avoids your module depending on globals directly.

motivation for this change are numerous. 

 - you can use `sed` to replace all instances of `global/document` with whatever for debugging
 - you can use recursive `require` analysis to find out how many modules touch `document`.
 - you can use any mocking library to mock `'global/document'` for something else at the commonJS level
      for integration tests in jsdom.

This came from a lesson learned from linkedin.

Other uses of `document` should also need this change