Display caption for individual thumbnails, and add link to file properties

This change also displays the image caption in the lightbox if it was an
individual thumbnail image. Also, it adds a link to the MediaWiki info
page for the file, which may have more details, so this remains accessible
when using the lightbox plugin.

Author: Jos Visser