Workaround preferences write issue

# Don't merge yet -- this is still just a POC

This pull request solves https://github.com/calabash/calabash-ios/issues/536

It worked on a sample app I was using but I would like to get confirmation that this works for others.

UIAutomation preference writing seems to be quite poorly implemented and racy. Reading prior to each write seems to force UIA to synchronize the preferences hence picking up concurrent changes.