first stab at tests. had to move curl.js to top leve folder for some reason. node couldn't find it even when package.json "main" is set correctly. go figure.
more tests and fixes
move module url resolution to a new realm.idToUrl function created during configuration
create module context tests
made loadScript into an internal module and did some cleanup and minor refactoring
refactor CurlApi and some other places where the inner frunctions can be hoisted