RUBY-620 fix unused or uninitialized variables
RUBY-618 remove dependency on 3rd-party utf8 encoding helpers

There was some concern of license compatibility with the 3rd-party encoding helpers we currently have in the bson c-extension. This commit removes the 3rd-party code and replaces it with an alternate implementation that came from the new mongo-c-driver.

This commit is a pre-requisite to RUBY-615 which is an effort to correct/improve our Apache 2.0 license compliance.