Fix getting encoding from the system environment
Fix getting encoding from the system environment

This change improves the ability to determine the encoding from the system by
doing the following:

* Enable looking at LC_ALL and LANG environment variables, in addition to LC_CTYPE
* Fall back to reading input.encoding from configuration file if not specified elsewhere

tkruse/jline2,renew-tgi/jline2,msaxena2/jline2,kaulkie/jline2,ctubbsii/jline2,fantasy86/jline2,DALDEI/jline2