Fix MMDB_vget_value so it can lookup the first entry that an IP points to

Previously it only worked if you were drilling down into a map or array, which
meant that if you had a database where all the entries were simple values
(like strings), you couldn't actually fetch those values in any way at all.

This API could probably still be simplified a bit, and the internals of
MMDB_vget_value could use some refactoring too.