Use new API `toLatin1`
Fix build on Windows

We need to define NOMINMAX due to conflicts with STL
library. See more here: http://support.microsoft.com/kb/143208
Downgrade the needed Qt version to 5.1.1

We are using release version of Qt now.
Remove text codecs imports.

All text codecs are part of Qt Core now.
Remove ICO plugin