fix captions for galleries and images
oops random cache key is a bad idea :)
check if caption is not empty
Merge pull request #5275 from Wikia/HG-captions

fix captions for galleries and images