Devirtualize Document class type checking

Document has a bunch of virtual bool is*Document() methods on it, but it also has
two bools for XHTML and HTML documents which is silly. We can merge them all
together into an enum of values and devirtualize the type checking methods.

This patch introduces the DocumentClass enum that is used to signal what subclass
of Document, or HTMLDocument, is being implemented.

Review URL:

git-svn-id: svn:// bbb929c8-8fbe-4397-9dbb-9b2b20218538
12 files changed