fix apidemos alerts test to use APPIUM_PORT
make sure app cleanup happens synchronously
make running one set of platform tests easier with test.sh
refactor ios.js to get rid of some instruments race condition bugs
update udidetect
update udidetect submodule
Merge pull request #1163 from jlipps/master

various fixes and refactors