Twenty Ten: change gallery category post meta output to check for a "gallery" category using `get_term_by()` to avoid a possible WP_Error for an empty result by getting a false (boolean) return value instead.

And, change link output to use `get_category_link()` instead of `get_term_link()`.

Props SergeyBiryukov and keoshi, fixes #23837.

git-svn-id: http://core.svn.wordpress.org/trunk@23793 1a063a9b-81f0-0310-95a4-ce76da25c4cd