Add skipping of unknown commit headers

This moves the check for the "encoding" header into a loop which
is just scanning for non-required headers at the end of a commit
header.  That loop will skip unrecognized lines (including header
continuation lines) until a terminating completely blank line is
found, and only then does it move to reading the commit message.
Merge pull request #1255 from arrbee/fix-signed-commit-header-parsing

Add skipping of unknown commit headers