mediawiki.js: Handle error better in log() and move out of mw.loader
console.error (in Chrome dev tools) takes an Error object. It
renders the stack trace nicely (incl. dynamic references to files)
but doesn't stringify the exception itself. It renders it as an
object (eg. no "{}" instead of "TypeError: Foo bar").
Some of the callers were embedding e.message manually. That was
better though, that still omitted the class (eg. "TypeError").
Error#toString composes the full message incl. class name prefix.
Change-Id: Id5b9872e2050326ab83889e3a806d015ec2ff3eb