move util.c declarations in utils.h it's not spelled `util.h' because otherwise it'd get included instead of /usr/include/util.h

de-duplicate hash_* function: collect them in util.c

fmt (some missing space -> tab conversion)

fix two related bug Don't crash when there's a certificate mismatch and after saving the cert, before choosing to persist it, the page gets redirected; also, don't repeat the "Certificate mismatch" after the first yes, if there's a redirect. Now when the user accept a certificate, is treated as temporary saved for the whole session.

allow saving the new certificate after mismatch

hash.c -> tofu.c