Major update to work with Sencha's build process.

Tidied up sencha files to match a 2.1.1 created project.

Fixed an issue with referencing ESRI components (specifically esri.geometrt.Envelope()) before dojo had finished loading. Went unnoticed in development mode, but switch to production mode and the javascript fails to parse the view/Main.js since there's a reference to an esri object inline in a static JSON object definition. Wrapping it in an immediately called anonymous function fixes this issue. Fortunately, very rare, but worth knowing.