add reset_iphone_simulator and support extend javascript

* add reset_iphone_simulator 
* support [extend javascript](https://gist.github.com/jollychang/8972186)