add explicit db disconnection to JobsModel

This patch solves the issue with mysql reaching the maximum concurrent connections allowed.