Fix an issue w/ cleaning up global.document.
Fix an issue w/ cleaning up global.document.

Except in the most recent versions of node, developers are unable to delete
things from global when running code in a node vm.  This means that enzyme is
failing to clean up after itself when temporarily defining global.document for
setState calls.

This papers over the issue by explicitly setting global.document to undefined
before attempting to delete. If the delete succeeds, the undefined value will
be removed.

Relevant jest issue - https://github.com/facebook/jest/issues/3152

Relevant node pr - https://github.com/nodejs/node/pull/11266

seejee/enzyme,seejee/enzyme,airbnb/enzyme,airbnb/enzyme