db.utils: Use unicode for GPG error messages

This patch makes the use of unicode more consistent, and enforces the
UTF8 charset for the added payload in case of failure.
Merge branch '0.3.5-fix-gpg-error-encoding-647'