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?
I think `window.frames` is ordered correctly, but if not, `document.getElementsByTagName()` should at least get you frames or iframes in the right order (I don't think you can have both on the same page).

I also don't think `window.frames` will get you `frame.src`, but I know that `document.getElementsByTagName()` will.  The latter is also something you can get without throwing a security exception, so it might be useful to report even if we cannot get into the iframe.