Send heap snapshot to the frontend immediatly when it is ready

HeapProfiler.takeHeapSnapshot command is now handled in the following way:

Profiler starts taking snapshot immediately when the command arrives (as before) and if reportProgress param is true it will send HeapProfiler.reportHeapSnapshotProgress events. After that a series of snapshot chunks is sent to the frontend as HeapProfiler.addHeapSnapshotChunk events. When whole snapshot is sent the backend will sent response to HeapProfiler.takeHeapSnapshot command.

The snapshot is going to be deleted automatically after it has been sent to the front-end. This means that all commands that require snapshot uid parameter will be removed from the protocol as there will be no way to find snapshot by uid on the backend.

BUG=324769
R=alph@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166131 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Show all heap snapshots in the base snapshot selector

Current heap snapshot wasn't added to the list of base snapshots of the last snapshot in the list as it was still marked as 'being recorded'. This change only adds a snapshot to the base list when its transfer is complete.

BUG=339429
R=loislo@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166132 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Refactor MemoryStatistics.Counter to represent a single graph.

R=yurys@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166133 bbb929c8-8fbe-4397-9dbb-9b2b20218538