Fix collection->hack array conversions
Summary:
Using collections::toArray as an intermediate was causing us to convert intish
string keys to int keys. For dict this caused us to do weak key conversions
when converting collections to dicts. For keysets and vecs if the original
collection contained an intish string key and an int key with the same value
we would raise a notice and lose one of the values.
Reviewed By: ricklavoie
Differential Revision:
D4355103
fbshipit-source-id:
34f2532cb654179595669ecb06ca5db59d6bc89f