Working on fixing the sigsum middleware

* Refine the SQL for SignatureSummary middleware
* Added a connection close() because we aren't using the base class query()
* Adding tests for SignatureSummary* middleware calls