VE-1592: Added native support for galleries to Parsoid

This is a "production ready" prototype/proof-of-concept.
At this moment HTMLDOM for Gallery diverge slightly (typeof) from spec (https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec/Gallery_RDFa) but this should be considered temporary and is caused by Wikia's messy approach to galleries (multiple types of galleries - and not all of them makes sense).

https://wikia-inc.atlassian.net/browse/VE-1592
VE-1592: Fix all tests + carry over <gallery attributes
VE-1592: Adjust Gallery serializing handler to catch only figures and placeholders

This is to avoid serializing diffMarks - which are not meant to be serialized
VE-1592: Send PHP Parser rendering for galleries in "alternativeRendering" attribute
VE-1592: Make sure that a node is element before calling getAttribute method on it
VE-1592: Use mapLimit instead of map to limit concurrent processing to some sane value - 100
Merge pull request #5 from Wikia/VE-1592

VE-1592: Added native support for galleries to Parsoid