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

Also adds `$sniffer.msieDocumentMode` property.

Fixes #4931.