refactor($sce): Use $sniffer instead of $document for feature detection.

Also adds `$sniffer.msieDocumentMode` property.

Closes #4931
Closes #5045