An event object used as a string will return its name - the event name
since php 5, no need to access objects by reference
add appropriate visibility keywords to event properties
remove reference operator from object, no longer required
Ensure hook array is always in the correct sequence

Changed to sort on add from sort on process for efficiency.  Some
events (e.g. AUTH_ACL_CHECK) could be trigged many times in a single
page request.
Merge pull request #555 from splitbrain/event_handler_improvements

Event handler improvements (cont.)