Fix potential NullPointerException in SmartStringBuilder
Add debug event kind and detail enums
Implement additional debug output
Implement more debug listeners