Fix intermittent hang in UI test tearDown

The super.tearDown sometimes hangs when truncating tables because of lingering pending transactions with locks on those tables. Kill them to avoid deadlock!
Once again wait for elements to appear rather than sleeping
Tweak timing to fix intermittently-failing tests

* `_click_add_tree_next_step` must wait for animation to show the next step
* In `add_tree_done` "edit" option, use a longer timeout because the plot detail page takes a long time to load
* In `test_can_retrieve_username`, sleep after hitting the "submit" button
Merge pull request #1312 from RickMohr/ui-test-improvements

Ui test improvements