Change priority of methods to calculate device type
Simplify getDeviceType()
Rewrite unit tests for getDeviceType()
Fix reset.sh by downloading UICatalog.zip from WebArchive

It is broken now because Apple removed old UICatalog.zip and replaced with one that
could only be built by Xcode6.