HeapProfiler: check that heap snapshot has no unretained entries except root.

TEST=AllocationSitesAreVisible
BUG=
R=mvstanton@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15591 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Improve test-cpu-profiler.cc tests stability

The tests sometimes fail on bots as they don't have time to collect enough samples. This change makes them use counter of samples taken when v8 is either in JS or EXTERNAL state and repeat sampling until desired threshold is reached.

BUG=v8:2628
R=loislo@chromium.org, yangguo@chromium.org

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

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