upgrade to freedom.js v0.6

These changes have all been reviewed with the exception of the "starting point" integration test for the TCP wrapper.

Unit tests pass and I've just tested all of the sample apps in Chrome so I will merge in a moment.