Mercury branch - all the changes and functionality we need to have Mercury skin working

DO NOT MERGE, THIS PR IS PART OF PROJECT MERCURY! 
I haven't looked too far into this, but I'd like to flag this as something that might benefit from a refactor. The video team has been working on an updated version of galleries, and we're probably going to need to figure out a good way to retrieve gallery data via ajax for https://wikia-inc.atlassian.net/browse/VID-1976. Pinging @garthwebb to weigh in, as we might want to combine efforts or at least coordinate. I agree with @drsnyder that this should be done better, but being somewhat familiar with this code, I can see why @hakubo did it this way.