Allow overriding file encoding

Chardet doesn't always seem to correctly detect files encoding
correctly in all circumstances, to make it so that a user can
specify the exact encoding of there files allow a new config
option and a new CLI option that allows for manually overriding
the encoding that chardet will try to determine.

If enabled chardet detection will no longer run.

Fixes bug 1384463

Change-Id: Ie8baf3f79083e1495c7420a9d0569390cad2115e
Merge "Allow overriding file encoding"