Contacts are at the heart of instant messaging, and thus the Chat Core has a way to abstract to a "person" (represented by an imIContact instance), which might connect to multiple networks, etc.
Chat Core uses a message style system based on HTML, JS and CSS that is very similar to the one created for Adium. If you plan to create a message style, reading the Adium documentation on the topic may be helpful -- see this tutorial and this reference sheet.
This is a page for documenting the notifications in Thunderbird. This is likely out of date. Notifications are grouped by interface you need to attach the observer to.