fixed [].sort() and obj.put behaviour.
Fixed a but in optimized array member access.

Thanks to Andrews Medina https://bitbucket.org/andrewsmedina for finding and supplying tests for it.
implemented [].indexOf and [].forEach
Merge.