Use chunks in trace event buffers

Separated from https://codereview.chromium.org/23799005/.

Chunks are fixed sized arrays of TraceEvents in trace event buffers.
Each thread borrows a chunk from the buffer, adds thread-local events
into the chunk without locking, and returns the chunk when it is full.

TraceLog also gets a chunk from the buffer for events that are not
suitable to use thread-local buffer.

With the chunks, TraceEvent never copies except when the trace buffer
is cloned.

Changed |flush_count_| to |generation| which indicates the version of
the central TraceBuffer. If a thread failed to flush in the last flush,
it may still hold a TraceBufferChunk from the original TraceBuffer.
|generation| controls the thread not to return the chunk to the current
TraceBuffer.
 
This is preparation for the new design for X events which exposes
TraceEventHandle through TRACE_EVENT_API.

BUG=trace-viewer:142
TEST=Existing TraceEventTestFixture.* tests
TEST=TraceEventTestFixture.TraceBufferRingBuffer*

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@227783 0039d316-1c4b-4281-b951-d872f2087c98
Document a restriction on declarativeContent CSS selectors and add a missing link.

BUG=172011

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

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