Use has-profile from user config.
Tell dojo explicilty that we're a foreign loader.
 Tell dojo we're only async.
Fix has() implementation. (It wasn't returning the cached value.)
General cleanup.