Refactor mobile JS loading, no more console errors.

So basically currently there are a bunch of console errors in the mobile app due to wrong loading of JS, for example facebox was being initialized which caused the first error.

So I tried to fix things by making sure that the main Diaspora javascript BasePage is not initialized on mobile (there was old code for that but `$.mobile` was never set) and that only JS which is needed is loaded.

Also the JS in the application layout has been moved to the head, since quite many of the HAML templates load JS which requires jQuery. This was causing jQuery and mobile JS to be loaded twice.

This fixed the console errors, but also the mobile bookmarklet.