Add function to get pending tasks according to filter

A Task is always associated to a resource and it can be identified by
the target_uri parameter.
That way we can properly get tasks related to a specific resource type.

Example:
GET /tasks?target_uri=^/debugreports will return all the tasks
associated to a debug report.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Add common function to track Task

Track a task is a common funtionality used on UI to idenitfy if the operation
has finished or not.
So create a common function to do it and reuse whenever is needed.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Add function to list all pending debug reports

Only the user who has started the debug report creation was able to get
the view of a pending debug report. But while switching tabs, this
information was lost.
To fix this behavior and also let all users get the same view, the
pending debug reports must be listed while loading the report grid.
In order to do that, create a function to return all the pending debug
reports.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
List pending debug reports while loading report grid

While loading the report grid, the pending debug reports will be listed
in addition to the existing debug reports.
It will let all users get the same view of which debug reports are being
generated and also prevent losing information while switching tabs.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Only disable report buttons when the selected report is pending

The actions buttons must be disable only if the selected debug report
is pending. Otherwise, the user should be able to rename/remove/download
an existing debug report while another one is being generated.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>