Handle cases where onload handler is attached after onload

It's possible that a plugin attaches an onload handler after onload.  In
this case, fire the handler as soon as possible, and trust it to use
navtiming (where available) to determine when onload actually fired.
implement a setImmediate function, and use it
if document.readyState is already complete, then fire page_ready immediately
Walk up DOM tree onclick to an Anchor

This fixes an issue found by @yuweitaocn

When clicking on an image/any other element inside a link, the click
target is reported as the image/element and not the link.  We need to
walk up the tree until we find the first Anchor that contains the
clicked element and use that instead.
make comments make more sense
well, cb_scope should be passed in last, not first
immediate is closer to 10ms than 50
make a debug versions when building prod version
add newline after functions that do not take window as well
add SOASTA to copyright
debug message to show the beacon we send out
utility method to convert object to a string.  also useful during debugging
handle undefined objects and non-objects, and most common use case should be default
Do not initialise RT more than once

The RT plugin attaches event handlers in its init method.  If init is
called more than once, these handlers might be attached more than once.
On most browsers, we detect if a handler is being attached more than
once, but on Safari 6, this does not appear to work.

The work around is to set a flag when init is called that makes sure it
is not called again.
Add debug messages with object dumps

When debugging, it's useful to know what cookies were set and read, and
which objects various methods were called with.  Add debug statements
for all of these.
Start time is max of click and unload time

When the user opens a page in a new tab, the click event fires, but the
unload event doesn't.  However, since we prefer the unload event over
the click event, we'll end up reading the unload time from the previous
page instead of the current page.

This patch sets the start time to the max of click and unload times.  If
both fire on the same page, we get the unload time.  If only click
fires, we get the click time.

This does not handle opening links with the keyboard.
use initialized instead of complete to determine if we have run init or not
Attach handlers only once

init may be called multiple times, so make sure we attach event handlers
only once.
IE8 does not support hasOwnProperty on host object

We need to use Object.prototype.hasOwnProperty since IE8 does not
support hasOwnProperty for host objects, and events are host objects.
This is only a problem when debugging events, but better not to blow up
when you don't want to.
terminate loop when etarget is falsy

clicking the document will fire the event on the HTML object and not
on the BODY object.  This will result in the loop terminating on error
when etarget becomes null