Vid 2089 Use JSSnippets to load galleries 

This is for tickets like https://wikia-inc.atlassian.net/browse/VID-2089 and https://wikia-inc.atlassian.net/browse/VID-2105, which are for new galleries not loading in places like message wall and article comments, where the HTML is inserted after page load. 

This solution uses JSSnippets to load galleries, and includes an update to JSSnippets that will make it will fire whenever any callback function is pushed to ```window.JSSnippetsStack```. Before, JSSnippets would only work on page load.  @macbre, could you please review this change?

There is another aspect to this ticket that is a fix for message wall. The problem was that the parser instance wasn't getting passed properly to the new media galleries. It is being past now. @armonr did that part. 
@lizlux, did you consider using ResourceLoader modules and adding them to ``$parser->getOutput()`` as a "parser hook dependency'. Take a look how [InfoboxBuilder implements it](https://github.com/Wikia/app/blob/dev/extensions/wikia/InfoboxBuilder/InfoboxBuilder.hooks.php#L54). Let's try to not reinvent the wheel :)