Eliminate gcc warnings from build and add optional support for ISO2022

1. Added some casts to avoid compier warnings that result in build errors
2. Added optional support for ISO2022 (VT100 Linedraw characters). If putty is started with the PUTTY_ISO2022 environment variable set, it supports ISO2022 while in UTF-8 mode