Use the default system encoding for commit messages whenever possible.

If it's not possible to encode the message using the default system
encoding then fallback to UTF-8. This probably only matters on Windows,
where it's possible to encode the message using UTF-8 but the command
prompt and other applications (like TortoiseHg for instance) may not be
able to display the UTF-8 text correctly.