Restore lightbox behavior for thumbnailed images
Summary: Ref T13099. See https://discourse.phabricator-community.org/t/lightbox-not-working/1201. The Content-Security-Policy changes rewrote some of this code and the handling for "Download" links is incorrectly catching clicks on thumbnailed images.
Test Plan: Clicked a thumbnailed image, got a lightbox. Command-clicked a download link, still got link behavior instead of a lightbox.
Maniphest Tasks: T13099
Differential Revision: https://secure.phabricator.com/D19188