Merge pull request #807 from kaysoky/FixAdminClient

Fix build
Add uniqueness constraint to message DTO (simplifies other logic)
In the case where a message thread is tied to an entity (i.e. a comment thread), there shouldn't be any user-ID filtering.  The filtering should be on the entire thread, done on the manager level (i.e. does the user have READ permissions on the entity?)
Add link between MessageThreads and Nodes
Migration tests...
Need a conversion between threads and nodes and vice versa.
+ Manager interface
Threads should not be linked to nodes, but to objects
This means threads will have to be broken off from messages into a join table
+ Fix up a few resulting errors
+ Revise DAO interface
Fix up remainder of the tests
Message threads can be a secondary type of messages since their unique keys are the same.
However, message thread objects can't be secondary to message threads, since the unique keys don't match.
Need to save the reply-to information for asynchronous sending of messages
Add null tolerance to utility
Looks like foreign keys tied to non-unique keys is an InnoDB extension to MySQL.  When *any* row of the foreign key is deleted, the change will cascade delete every dependent row even if the foreign key constraint is still met (due to duplicate key).

We could have a single-column table just to hold threadIDs and thereby prevent this weirdness.