more tests from Chromium, Mozilla, and Ude <http://code.google.com/p/ude/>
don't overfit for short multibyte sequences <https://bugzilla.mozilla.org/show_bug.cgi?id=306272>
remove unused imports
Easier compatibility
Fix BOM detection #4

The BOM detection was comparing str instances with bytes instances.
e.g.  b'\xEF\xBB\xBF' ==  '\xEF\xBB\xBF'

Test status before commit: 377 tests 25 failures
Test status after commit: 382 tests 25 failures
Merge pull request #5 from byroot/fix-bom-detection

Fix BOM detection #4

Thanks @byroot
Fix the errors. Use codecs module.

Closes #3
Fixes #8 and release 1.0.2

https://bugs.gentoo.org/show_bug.cgi?id=452466