Removed the following indexes that are implicitly created by primary keys:
d_m(id)
d_mm(message_id, id)
d_mc(message_id, metadata_id, content_type)
d_mcm(message_id, metadata_id)
d_channels_index1(local_channel_id)
d_message_sequences_index(local_channel_id)

Removed the following indexes that are no longer needed:
d_mcm(message_id)
d_mcm([dynamic columns])

Added index:
d_mm(message_id, server_id, id)
d_mc(message_id, metadata_id) - needed by foreign key

Made sure that all foreign keys have indexes.

Made sure that columns in composite indexes are ordered by highest cardinality first.

Made all primary key declarations explicitly set the key name.
Issue: MIRTH-2804
Fixed some minor TODOs and removed several TODOs that are no longer needed.
Issue: MIRTH-2675