VID-2071 Adds hard upper limit to gallery size

RFCR @garthwebb @lizlux 

Any more images than the 3K limit in the gallery are dropped on render.
This is to prevent performance problem with current gallery implementation, mainly concerning DOM size.

https://wikia-inc.atlassian.net/browse/VID-2071