Reworked formatDebug / stack code.

* Logging should be significantly faster when formatDebug is false or the data.stack property isn't referenced.
* The formatDebug method now has access to the V8 JavaScript stack trace API.