Fix compiler warnings, analyzer warnings and a bug

This fixes all warnings generated by modern versions of clang (3.4) and GCC (4.8.1), as well as clang's static analyzer (reporting unused stores). Also fixes a bug in the UT_TOTAL_LANGUAGES value which did not include cyrillic.