Updated dojo calls to use AMD style.
Fixed package loading of metadataExtensions.
Updated metadata unit tests.