Refactor and fix collapse browser tests

* Add background code to create regular topic
* Use visibility checks for determining if collapsing works
* Fix a couple bugs and merge issues with flow_page and add a
  couple elements.
* Make helpers a little smarter (waiting for add topic JS action
  to finish before moving on and working around a bug)
* Update collapse modes in tests to match current UI terminology

Change-Id: I9446d961643501abd3a44fa80f2101cc96f6a161
Merge "Refactor and fix collapse browser tests" into frontend-rewrite