mediawiki.js: Clean up and improve documentation coverage

Function addStyleTag was only documented as a private function,
since a while now it is also exposed as a public method.

Rename the private function so that they can both be included
in the JSDuck index (jsduck can't deal with name clashes between
public and private). Optimised by letting it inherit the
documentation instead of repeating it.

The following were missing documentation:
* mw
* mw.hook
* mw.legacy
* mw.loader#addEmbeddedCSS

Moved assignment of `done` in mw.loader#addScript to where it
was needed. The other if/else paths in that function don't use
it and don't need it to have a value.

With the introduction of mw.log#deprecate (fe46903) we no longer
need mw.legacy. mw.legacy was created for future use to move
legacy stuff into to make it easier to keep track of where they
are used (simple search for 'mw.legacy') however that never
happened and in retrospect was probably a bad idea as it would
require people to change code twice.

We now have a much cleaner solution now that we're able to
create little accessors on any host-object with mw.log#deprecate.
This makes mw.legacy obsolete and it should not be used for
anything. Just in case something is using it I won't remove it
just yet, instead I've deprecated the (what would have become
the) deprecator ;-). We should be able to remove this in 1.23.
Note: Can't use mw.log#deprecate here because that isn't defined
yet at this point, this is the core library which can't have any
dependencies.

Change-Id: I5d241e4284f07a6be271c04cec3a5833dbaeed91