use index instead of shift because it's the faster
use location.href instead of document.URL

#1154
fix location.href in sandbox
Update util-events.js

发现一个影响风格的分号。
Merge pull request #1162 from yooungt13/patch-1

I服了u
add emit "save" event
change determining status to LOADED when registering waitings

support  circular dependency
restore circular test
add more circular tests
revert circular, add multi-entry test