Fixes bad scope order/overlap issues.

This was caused by the out-of-order event handling causing issues with
parenting of scopes. The cleanest fix is to just sort and insert in order
instead of trying to be clever, which this does. It's a bit slower, but not
by much and makes things work right.

Also fixing the tracing code for nightly chromium.

Fixes #207.
Work on #211.