engine: Delete jobs that their steps have no async-tasks

Sometimes async tasks complete but there were database errors
when closing the steps and jobs. This patch updates the periodic
job deletion to delete such jobs.

Change-Id: Iae00d615bff79f42d8428b867f1816d6e0aa9a72
Bug-Url: https://bugzilla.redhat.com/1055162
Signed-off-by: lzelkha@redhat.com <lzelkha@redhat.com>
engine: Add dao_unit_test to DeleteCompletedJobsOlderThanDate

Added a unit test to check that DeleteCompletedJobsOlderThanDate deletes
jobs and steps that have no async-tasks

Change-Id: Iba883b90fc8fc89096a98beec796d4600714eb15
Signed-off-by: lzelkha@redhat.com <lzelkha@redhat.com>
Bug-Url: https://bugzilla.redhat.com/1055162