Implemented uploading media from JS.
Code refactoring.
Code cleanup
Merge pull request #17 from Sitecore/JS_Media_Upload

Implemented uploading media from JS.