Improve unit test coverage

Remove logging from unit tests for Python > 3.1
UCS2 decoding fix, improve test coverage, bugfixes
Fix UCS2 and 8-bit encoding