Add Ajax events and move browser functions out of the global window

The HawkEvents class now supports simple, string based event
identifiers.

When a new page is requested the "ajaxbegin" event is fired.
When the page has been rendered the "ajaxend" event is fired.

All the client-side specific functions can now be found in the
hawkejs namespace, instead of being global functions.