mediawiki.jqueryMsg: Extend mw.Message with new #parseDom method
Unlike #parse, this one returns a jQuery set of DOM nodes and not a
HTML string, for two benefits:
* Allows to skip unnecessary HTML serialization and reconstruction
when we just want to insert the message contents somewhere.
Old way:
$( '#foo' ).html( mw.message( 'foo' ).parse() );
New way:
$( '#foo' ).append( mw.message( 'foo' ).parseDom() );
This is roughly equivalent to the old alternative:
$( '#foo' ).msg( 'foo' );
But that way can't be used if you start with a mw.Message object, or
don't yet know where the elements will be inserted.
* Allows to preserve the event handlers when a function is passed as
message parameter.
mw.messages.set( 'foo', '[$1 Click me!]' );
$( '#foo' ).append( mw.message( 'foo', function () {
console.log( 'Link clicked!' );
} ).parseDom() );
Change-Id: Ia09131c2ffc1d149ca6b1c32dcd918a539c3a719