PYTHON-346 - Reimplement pure python BSON encoder.

This is the first step in rewriting the pure python BSON
module. These changes provide measurable improvements for
all types including up to a 95% improvement in encoding
performance for lists/tuples.