Fix history and add section tabs being collapsed on RTL wikis

The module is now loaded in the 'top' queue instead of the 'bottom'
one, so the <body> tag isn't loaded when the RTL detection is done.
Use the <html> tag's 'dir' attribute instead.

Bug: 50196
Change-Id: I6e277a9503a1e6003bc7bf9f9468ed7b35552e60
Merge "Fix history and add section tabs being collapsed on RTL wikis"