Fix bug, callbacks[callbackId] is undefined
use $window instead window
Revert "temporary disable fetching previousVersions."

This reverts commit fcd2a15af679163729837189970112238971e183.
* temporary disable fetching previousVersions v2.

It will block grunt till the the remote information back. If the networking is bad, it will block forever, which is very bad. This information is never used at all. see /Gruntfile.js.