usr.bin/diff: fix UBSan error in readhash
UBSan complains about the sum = sum * 127 + chrtran(t); line below since
that can overflow an int. Use unsigned int instead to ensure that
overflow is well-defined.
Reviewed By: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31075