Added testing libraries. Updated gradle build. Added more tests.

The libraries are provided by https://code.google.com/p/android-test-kit/.
Hopefully this will make writing more tests easier.