Link hashes in Remarkup commit links
Summary: Also generalize the code a bit.
Test Plan:
rPF57bc7f#inline-874
rPF57bc7f#874
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D4168