Refactor to make it easy for others to add screen capture to their extensions

This seems to work. I've only tested it lightly. I'm happy to fix/improve things.

I plan to change the page/extension communication to use a port in another branch. That will eliminate (or at least greatly reduce) the possibility that an extension using this code gets its wires crossed with incoming messages.

Fixes #11

Why not just put this in a self-executing function, e.g.,

```
var pageCaptureAPI = (function() { ...; return {...}; })();
```

That way you don’t need to call it like a function before using it. Is there some internal state that I’m not seeing that requires something other than a singleton?