add String_io.open_in utility function
JS backend: use async XHR, extend test code
adds both synchronous and asychronous http clients.

In general the async one is the right client to use.  However, in IOCaml
toplevel expressions must evaluate immediately to show a result,
or produce some side effect.  It's easier just to provide both versions here.
fix typo in (c) note in test_xhr.ml
rename Client_async to Client
Factor out common code, add parameters

Factor common code with Body_builder and Make_api functors.

Parameterize building the sync or async versions over chunking and
how the final data conversion is actually done (raw bytes or UTF
encoded - I'm as yet 100% sure on the correct interpretation).

Provide modules with best known defaults.
Merge pull request #177 from andrewray/async-xhr

Sync and Async XmlHttpRequest client modules for javascript.