Reconstruct sunpinyin-*-extend.py.
Improve readability of *extend.py.

* Remove pre-mature optimisation.
* Real modularisation.
* Minor improvements.
Refine sorting and format, see comments in sort scripts for details.
The actual re-sorting (semantic lossless transformation).
sunpinyin_char_extend.py: add support for `kMandarin' entries.

Import priority:
kHanyuPinlu > kXHC1983 > kHanyuPinyin > kMandarin
Pinyin of characters with frequency indicated are unmodified.
Actual import of `kMandarin' data.
Reintroduce corrections made durig commits 79b7 through 0e6f.