Allow overriding the serialization rules in MarkupAccumulator

Add a flag for overriding the default policy of basing the serialization
on the type of the owner document.

Use in XMLSerializer to force serialization of character entities based
on XML rules.

BUG=340794

Review URL: https://codereview.chromium.org/184273003

git-svn-id: svn://svn.chromium.org/blink/trunk@168819 bbb929c8-8fbe-4397-9dbb-9b2b20218538
10 files changed