[Runtime] Fix identify the app package type while loading it.

Current implementation identify package type by configure document
name, 'manifest.json' will be recognized as XPK package, and
'config.xml' will be WGT package, but it's not always right if both
'manifest.json' and 'config.xml' exist in one package.

This patch add a package type parameter when loading it, to make sure
that unpacking and parsing package use the same package type.
Merge pull request #1957 from takethathe/package-type

[Runtime] Fix identify the app package type while loading it.