All UI tests wait for any transaction-causing requests to complete

Improve `wait_until` functions, and use them in all tests
* add new functions
* several take either an element or a css selector, and return the element
* use `lambda`
* add doc strings

Also:
* remove call to kill pending transactions, because there should no longer be any (and it sometimes hung anyway)
* remove all `sleep` calls -- use `wait_until` calls instead
* DRY out tests in `plot_detail.py`
* simplify tests in `registyration_views.py`

Note that some tests still exit with pending requests for map tiles. But because those requests don't change the database there should be no transactions created and so no problem with deadlock.