Rewrite staticBrowserREST.js

This rewrite is in two parts. The first can be accepted without the
second.

1. Factor out the request logic into two functions. This gives
considerable simplification.

2. However, once this simplification has been achieved, it seems that
using obtainJS is overkill for this module, so the second part removes
it, reducing the size of the module considerably.