Threads revisited

Make threads more generic. Any object can now have a thread conversation complete with entry type and attachments.