Implement frame traversal for the navtiming and restiming plugins

The approach I've taken is to add a `frames` array property to the request when accessible frames are detected by either plugin. The format of each object in `frames` is similar to the main beacon format, only nested. So each object in the array has a `u` property containing the URL and will also have properties from the `navtiming` plugin, the `restiming` plugin or both. They may have nested frames too, which may have etc and so on.

In doing this I made some changes to both plugins in order to get code-reuse. But essentially they are the same as they were before, with additional calls to some new functions that I added to the core module: `forEachFrame` and `addFrameVar`. Implementing those necessitated a further couple of private functions in the core module, `addVarTo` and `getAccessibleFrames`.

Tested in latest Chrome, Firefox & IE.

What do you think, any good?
What do we do about anonymous iframes?  `document.URL` tends to be identical to the parent's `document.URL`, but `frame.src` will probably be undefined.

I'll accept the patch even if we don't figure this one out, because I don't think that's a simple fix.