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

Improve `wait_until` functions
* 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 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.
Merge pull request #1383 from RickMohr/robustify-ui-tests

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