Adding tests and resolving some TODO's

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226317 0039d316-1c4b-4281-b951-d872f2087c98
CC: Ensure recycle tree contains no 'active' tiles.

Active tilings become recycle tilings due to our tiling-swap
while activating. But some active tiles exist that are not
in the pending tree (due to invalidation).

We need to remove these tiles or reset their priorities,
as otherwise they will just take up memory in the Tile-
Manager.

This adds DidBecomeRecycled, which resets all active
priorities. Combined with DidBecomeActive, this should
eliminate any 'old active tiles' (that were active and were
invalidated) from being prioritized in the TileManager.

BUG=299359

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226318 0039d316-1c4b-4281-b951-d872f2087c98
Fix crash when ECHO_TO_CONSOLE

TraceEvent's copy constructor has a side-effect that the ownership
of the convertable values will be passed from the source TraceEvent
to the target TraceEvent.

Handle ECHO_TO_CONSOLE before the event is added to the buffer.

The copy constructor will be obsoleted soon to avoid such issues.

BUG=302676
TEST=Run cc_unittests with --trace_to_console

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226319 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 226318
Fixes in Local Discovery logging.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226320 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 226320