Fix language markup for previews

The "Preview page with this template" feature was using the language of
the template page rather than that of the page being previewed, causing
incorrect layout if they differ.

Special:TemplateSandbox was ignoring the language of the page being
previewed, resulting in incorrect layout if that language differs from
that of the special page itself.

Both of these may be observed by previewing with an existing
MediaWiki-namespace message from a language with a directionality
different from that of the wiki's content language.

Change-Id: I2a3556ff05a837e5deea311abff81be2de7bd582
Merge "Fix language markup for previews"