Improve detection of simplified and traditional Chinese

Resolves:  #857967 https://bugzilla.redhat.com/show_bug.cgi?id=857967

see also http://code.google.com/p/ibus/issues/detail?id=1492
“unable to write 晞 with any of the two Wubi input methods”
晞 (wubi code = JQDH) cannot be written.

- add a script generate-chinese-variants.py which parses
  Unihan_Variants.txt from the Unihan database and generates another
  Python script.  The generated Python script contains a hash table
  with information which characters are simplified, which
  characters are traditional and which characters are both and
  a small function using that hash table to detect whether a string
  is traditional or simplified Chinese or both.
- use the generated script and function in tabsqlitedb.py instead
  of the old way to distinguish between simplified and tradtional
  Chinese which used test encoding to legacy encodings like gb2312
  and big5hkscs.

The new way of simplified/traditional detection should give
better results. 晞 from issue 1492 is now classified as both
traditional and simplified Chinese, not only traditional as it
was with the old detection code.