Modernized the fullscreen API and added support for IE11. fixes #1155

Built on top of #1155. Also fixes #673.