Don't bind DebugKit when in CLI mode.

Bad things will happen if DebugKit is running in CLI/test mode.

Refs #240
Panels should be initialized early in the process.

By initializing panels early will allow queries/log messages fired in
the routing layer to be captured by DebugKit.

Refs #230
Fix warnings when config is missing 'className'

It seems that somehow the proxied engine can be missing the className
index. If the _engine property is set the name can be reflected from the
instance.
Use separate priorities for before & after events.

The before callback has to fire before all the other listeners so that
it can correctly capture any queries issued from routes.
Merge pull request #250 from cakephp/no-console

Disable DebugKit in CLI, and fix queries not being logged in routes.