Merge pull request #260 from biozic/master

Fix inversion in writeBson for bools.
Make allocators shared - due to D's GC this will cause bad memory bugs otherwise.

Specifically, the "nice" property of the GC to call finalizers in different threads than the constructor - even for thread-local objects - would cause an object to be deallocated by a different allocator than the one that allocated it.
Add an allowed_chars parameter to urlEncode().
Implement deregisterLogger().