"readline" frontend doesn't work without a controlling TTY as can be
seen by setting DEBCONF_DEBUG=user before running dpkg-reconfigure, so
use "teletype" instead.
Also note that DEBIAN_FRONTEND environment variable unexpectedly seems
to override the value explicitly passed via dpkg-reconfigure -f option,
so we need to reset it (and then we don't need the -f option at all).