Bug 605, Bug 606 -eChequeServer fixes

I have moved the SQL code to the echequeDB class and have provided
additional error handling. We will need to add logging/reporting of
failures.