Add stackData to debugbar logger

In the case of a redirect, stackData saves the current log, and it will be
available in the debugbar of the redirect page. 

To implement, had to resolve issues with the way the events are triggered.
System module grabs core.include.functions.redirectheader and does the 
redirect in most cases, so we cannot reliably chain off of this event. Added
a new event core.include.functions.redirectheader.start so we can get the
event in time to do the debugbar magic.

Cleaned up some things related to the redirect events that won't get triggered.
Fix errors in database error message build
Merge branch 'master' of https://github.com/geekwright/XoopsCore
Merge pull request #18 from geekwright/master

Fix legacy logger issue, add stackData() in debugbar logger
Merge branch 'master' of https://github.com/XOOPS/XoopsCore
adding missing links to legacylogger file for XoopsLoad