bash-init: i18n fixes

- delete unused and broken function 'resetlang()'
- correctly recognize errors in 'locale', related
  refactorings
- handle failures in automatically setting the
  locale to 'en_US.UTF-8'

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>