Story 1732: Make licensing agreement customizable

Make licensing notice un-hardcoded for editor, talk, and upload
interfaces.

Also, only mention Terms of Use if ToU link has been activated.

It also needs to be overridable by other extensions, e.g.
WikimediaMessages.

Also, fixing the way the footer links are built, so that it is
more similar to desktop and the links are selectable (for checking
if the ToU link is activated).

Dependency: Ic5eae6ed86bac87716454644ea053bf8796b20c6
Change-Id: Iaa72c5998479f9d18e7a111060bf4edda3bca7bb
Merge "Story 1732: Make licensing agreement customizable"