Introduce DONE state in idle notification handler.

BUG=
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/577573002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Fixed int vs. uintptr_t confusion (plus some cleanup on the way).

BUG=v8:3556
LOG=y
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/567573004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00