Small enhancements to the js template

- Removed dojo from allowed global objects header comment.
- Moved declare to the first position. It was in the middle and it is very easy to lose it, which causes weird exceptions at runtime.
- Removed dojo.provide
- Changed various non-AMD calls to their AMD versions.