allow supplying the length of a key.

Many of the language bindings that will use this will know the length
of the key already. So we might as well allow ourselves to avoid many
strlen()'s being called.
implement bson_iter_type().

Adds some checks in unit tests to make sure the iter has the right
type using BSON_ITER_HOLDS_*() macros.