Restore scripts/wait_for_emulator.sh

This script is used as part of our test suite for Travis CI, and is
needed to prevent the build from failing. (Or to be more accurate, to
allow the tests to run at all.)
Remove emulator from L preview bit.
Fixed a string comparison.
Replace .commit() with .apply() in PrefUtils.java

Fix according to issue #20
Merge pull request #24 from seewes/patch-1

Replace .commit() with .apply() in PrefUtils.java
Merge pull request #18 from tjohns/master

Restore scripts/wait_for_emulator.sh
Merge pull request #21 from Lukas-Stuehrk/FixStringComparison

Fixed a string comparison.