Corrections after change to Message.pm

Added missing ',' to sql in Messages.pm and updated tools edi
template to use updated column names.
Tidied tools/edi template
Correct sorting of messages in tools page