engine: Fixed view to return correct task

The task associated with volume is used to build
the activity column. In case of jobs that are started
but not yet associated with task id, the job status
will be 'STARTED'.

Fixed the stored proc to use this logic to pick
the correct task id.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1064295
Change-Id: Ifb25e2f59c4d5cfa063e498ada4e0091cc4ff53b
Signed-off-by: Sahina Bose <sabose@redhat.com>