improve compatibility for python 3

- correct .travis.yml
- make TransformerIterator iterable
- remove comparison "None > 0"
- use six.text_type instead of unicode
- use six.moves.input instead of raw_input
- use six.moves.reduce
- use operator module instead of lambda function
- integer conversion
- convert the pretrained test data
- remove some unused import
The encoding is not about source code, but about pickle opcode. Some pickle opcodes have values which are larger than 0x80 (see https://github.com/python/cpython/blob/master/Lib/pickle.py#L148), and those opcode could be invalid in utf-8. That's why I used latin-1, an 8-bit character set.