Fix the signature generation for GitHub payloads.

GitHub payload signatures are encoded in SHA1, but we were encoding in
MD5. This updates our signature code and tests to encode in SHA1.

Reviewed at https://reviews.reviewboard.org/r/6321/