Protect document.write

- keep a reference to the original implementation of document.write on load of library, lest it be reassigned
- alter tests to swap this around rather than global document.write
add test and fixtures for document.write overriding
Merge pull request #150 from mobify/v1.1-jazzcat-document-write-ref

V1.1 jazzcat document write ref