Code review: Resource Timing API

Right, I'm so sorry about that last pull request, it wasn't encoding the data at all correctly.

Rectifying that necessitated moving some logic into its own utility function, which I've called `pushVars`, so that it could be called recursively.

I'm running this in Chrome only at the moment and it works ok there - wanted to see whether I was on the right track before going any further.