MIRTH-1239: Added "fileDirectory", "fileSize", and "fileLastModified" into the source map for File Readers. Code templates have also been added to the references list.
MIRTH-3386: Fixed issue that caused deadlocks to occur when remove content on completion was used.

There were actually a couple of issues going on here. First, in the main message dispatch thread, we were actually using the in-memory Message object to determine whether content was okay to delete (by checking the statuses). This is incorrect when destination queuing is involved, because even though a destination may have updating the in-memory status in another thread, it may not yet have committed it.

This led to a (fairly common) scenario where the queue thread updates the destination status to SENT but has not yet committed anything. Then asynchronously the main dispatch thread will check the statuses and see that everything is complete, so it deletes all the content. That delete and the commit for the destination queue can happen at the same time, which causes a deadlock.

To fix that, when destination queuing is used the content deletion (for both the main dispatch thread and for all destination queue threads) is always done in a separate transaction, and we're now querying the database to get the current statuses, instead of getting them from the in-memory object.

However another issue is that if both threads perform the content deletion at the same time, that can also cause a deadlock. To fix that, the channel now keeps a ReentrantLock specifically for content/attachments removal. Any thread that wants to remove content needs to first obtain the lock. The lock is only used if the remove setting is enabled on the storage settings and queuing is enabled on any of the destinations. If queuing is disabled for all destinations then we don't even have to query the database anymore, and we can still do the delete in the same transaction like we were before.
MIRTH-3387
A new reference has been added to the JavaScript scope: "destinationSet". This represents all the destinations that will the message will be sent to. Users can remove destinations using the provided methods on the DestinationSet object: remove, removeAllExcept, removeAll. 

The constant mirth_destinations has been renamed to destinationSet. The sourceMap value for this constant is now read only. 

JavaScript executors now take in destinationIdMap instead of destinationNameMap, which is the same thing without the "d" prepended to the metaDataId. ResponseMap prepends the "d" directly to account for this change since it was the only place it destinationNameMap was used.

MIRTH-3391
MIRTH-3392
Fixed setting destinationMetaDataIds on RawMessage from JavaScript not working
destinationMetaDataIds can now be a JavaScript Array or any Java Collection