improve handling of contributors gravatars

Place the gravatars inside the links, so when active the gravatars still
show.  Also make the javascript idempotent, and handle the gravatar not
existing.