Apply ender-core logic to branch:master

- Uses the [`.window`](https://github.com/ender-js/ender-js/commit/480199257ef2483bb7260a3af33faa8fbebc0d17#commitcomment-4595520) check and inlines the stack logic like d10a571f93f3d4b14b85ff41b5229141e5feeafd
- Defers the `document` lookup until needed.
- Notes that `._VERSION` is deprecated.