VE-1672: Insert mwGallery

We weren't accounting for the possibility that the wiki would have wgEnableMediaGallery disabled, thus using mwGallery nodes. There are now 2 insertion paths.