mediawiki.user: Simplify implementation and jsduckify
Similar to mediawiki.util:
* Return plain object instead of an instantiated function.
* Refer to local reference instead of 'this' which makes it
possible to use all methods "detached" without needing
a specific context bound.
* Fix documentation comments be valid in jsduck syntax.
- @example was invalid
- "foo String : desc" was invalid, changed to:
"{string} foo Desc"
- type {false} was invalid, changed to {boolean}
- reference mw.user.foo was invalid, changed to
mw.user#foo.
- getUserInfo was missing @private.
* Include in JSDuck index.
Change-Id: I2732cd7422f444b5cad1c6737a2de5dafb12d541