Added unit tests for delete thread.

Unit tests can now be run via gradle.
Added UI test for deleteing a thread.