Changed browser_action and tabs events to use Streams.

Added code to browser_action and tabs to cleanup the state of the browser (at least when tests pass).

Added several more unit tests for browser_action and tabs.