Add Ubuntu webapps integration JavaScript, and a ready() method on the D...

...iscourse app object which fires an event so that integration scripts can use it.