Make threads generic

Detach conversation thread from ticket to make it more generic. Any object
can now have its own thread complete with entry type and attachments.
Add centralized object model registry
Fix attachment fetching to be object based
Bug: attachments

Auto-detect inline attachments
Attached keepers to canned reply
Use generic attachment table

Use generic attachment table for all attachments system-wide.
Drop thread entry attachment table
Use criteria lookup to get thread entries