Packaged apps support

These commits make the client work in firefox os and chrome apps.  I've knocked up a really basic
 proof of concept [packaged app demo](https://github.com/raoulmillais/7digital-html5-packaged-app-demo) which you can try out to see it in action.  I used the [firefox os building blocks](http://buildingfirefoxos.com/building-blocks/action-menu.html) so the styles are pretty basic and look a bit hooky in chrome.

* To run the demo for firefox OS you'll need the firefoxos simulator.  Instructions can be found [here](https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Using_a_Firefox_OS_Simulator_Add-on)
* To run the demo as a chrome packaged app, you can find instructions [here](https://developer.chrome.com/apps/first_app#five)

![ffos-demo](https://f.cloud.github.com/assets/302663/2493223/6fcb6e6a-b286-11e3-8d91-d3ce649e28f6.png)