Marionette testing and network simulation

This adds Marionette testing via the `npm run-script marionette` command, and also a script to change the local network setting between the proxy and the client.
You can use it with `npm run-script networksimulation EDGE|HSDPA|LTE|default` (use `default` to restore default config).
We're using prototype-based "class" functions throughout the code, I think we should keep it consistent.