Use a port for communication

This is a branch from #14, so that should be merged first and then I can merge master into this branch to clean up the diff.

All communications are done via a port that exists for the lifetime of the screen capture. When the capture is done the port is closed (by the content script). The incoming port connection in `api.js` is checked to make sure it's definitely for us. This makes it pretty much impossible to (accidentally) get crossed wires due to simpler messaging in any extension that uses this code.

The flow of control logic changes a little, in a way that I think is cleaner and more explicit. There are messages passed now to request a new arrangement, to request a capture, to indicate the capture is done. The possible failure modes are clean / easy to understand.