M59: Clear the PrintContext in WebLocalFrameImpl::Close().

Also explicitly call PrintContext::EndPrintMode(), rather than calling
it in the destructor. Add a ScopedPrintMode helper class to do that
conveniently.

BUG=716474

Review-Url: https://codereview.chromium.org/2848823005
Cr-Commit-Position: refs/heads/master@{#468882}
(cherry picked from commit 85b7d7b31f25da2481ab2fa569c7b37a42abdeb6)

Review-Url: https://codereview.chromium.org/2864753004 .
Cr-Commit-Position: refs/branch-heads/3071@{#429}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}
5 files changed