Timeline: make trace model rely on event order, not timestamp where possible

We may get several events with same timestamps if timer resolution is low,
so defer event nesting based on event order where possible and only use
timestamps in case nesting may not computed otherwise.

Drive-by: fix inspector/layers/tracing-layer-tree.html that was failing for several couple of reasons, including the above one.

BUG=361045

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

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