define HeUTF8 macro for perl 5.10 and perls < 5.8.9

The HeUTF8 macro was added to 5.10.1 and backported to 5.8.9.  It is
not yet provided by ppport.h so this adds it to our own header
Avoid making an index direction look like a string

The code for determining if a scalar is a string or a number for
serialization gets tripped up if the scalar has been used as
a string. This cropped up in tests with Perl v5.8.5 so it may
not be an issue on v5.10+.

The commit copies the value in question before testing it to
preserve its original form.
update Changes
s/WITH_OID/BSON_WITH_OID/ to fix bug in libbson

libbson defines BSON_WITH_OID32_PT and BSON_WITH_OID64_PT, but the
original source file checked them as "WITH_OID32_PT" and
"WITH_OID64_PT".