Timeline: rearrange trace completion logic for better extensibility

This generalize the way we finialize timeline recording so that it's
easier to plug in extension trace providers.

BUG=620066

Review-Url: https://codereview.chromium.org/2137213004
Cr-Commit-Position: refs/heads/master@{#405918}
2 files changed