Some optimizations for StrMap; add unsafeIndex

Since we know that all StrMap objects have prototype Object, we know
they have no additional enumerable keys, so hasOwnProperty checks are
unnecessary.  Add efficient JS implementations for keys and values.
Minor other changes to eliminate unnecessary function layers and
variables.
Fix and improve StrMap tests