Tiled Galleries: properly escape image meta before output

Merges r97401-wpcom.
Tiled Galleries: Tabs > Spaces

Merges r97402-wpcom.
Tiled Galleries: even `json_encode()`'d data needs to be escaped for attributes

Merges r97425-wpcom.
Merge pull request #549 from Automattic/merge-gsteph-15-may-2014

Merge gsteph 15 may 2014