Make dbm.dumb encode strings as UTF-8. Also fix it so it accepts bytes and
strings.

Closes issue #3799.
3 files changed