Better sorting of the lookup table in the mixed Chinese modes

In the mixed Chinese modes 2 and 3 (simplified Chinese first and
traditional Chinese first), the filtering for simplified and traditional
was done as a last step filtering the candidate list already sorted
using the sort keys:

    - exact match?
    - user frequency
    - system frequency
    - length of input sequence
    - alphabetical order of input sequence
    - Unicode code point of first character of matched phrase

But this simplified and traditional filtering is basically just
another sort key. Doing this after the main sorting of the candidate
list is inefficient and does not give nice results either. It is
better to do all of the sorting in one place.

The sort key for the desired Chinese variant (traditional or simplified)
should have higher priority than the system frequency but lower
priority than the user frequency. If the user selects a certain variant
often, it should be preferred in future.

An example for the behaviour after this commit is applied:

wubi-jidian86.txt contains the following matches for 語
(as a single character):

    ygkg	語	204000000

It contains the following matches for 语 (as a single character):

    ygk	语	234000000
    ygkg	语	234000000

And the following matches for the input sequence “ygkg”:

    ygkg	語	204000000
    ygkg	语	234000000
    ygkg	⌐	0
    ygkg	ㄟ	0
    ygkg	鐕	0

After this commit, typing “ygkg” gives the following results in the
lookup table (when all user frequencies are 0. For testing this
can be achieved by removing the user database):

Chinese mode 0, “simplified Chinese only”:
==========================================

ygkg (1/4)
1. 语 234000000 0
2. ⌐ 0 0
3. ㄟ 0 0
4. 鐕 0 0

Chinese mode 1, “traditional Chinese only”:
===========================================

ygkg (1/4)
1. 語 204000000 0
2. ⌐ 0 0
3. ㄟ 0 0
4. 鐕 0 0

Chinese mode 2, “simplified Chinese before traditional”:
========================================================

ygkg (1/5)
1. 语 234000000 0
2. ⌐ 0 0
3. ㄟ 0 0
4. 鐕 0 0
5. 語 204000000 0

Chinese mode 3, “traditional Chinese before simplified”:
========================================================

ygkg (1/5)
1. 語 204000000 0
2. ⌐ 0 0
3. ㄟ 0 0
4. 鐕 0 0
5. 语 234000000 0

Chinese mode 4, “All Chinese characters”:
=========================================

ygkg (1/5)
1. 语 234000000 0
2. 語 204000000 0
3. ⌐ 0 0
4. ㄟ 0 0
5. 鐕 0 0
Merge pull request #40 from mike-fabian/better-sorting-in-the-mixed-chinese-modes

Better sorting in the mixed chinese modes