show task name in case of bad applicability query

Before the change, 'UNKNOWN' is shown as task name when task is invalid
due to bad applicability query, which makes it difficult for users to
identify the misconfigured task. Update logic to output valid task name
instead of 'UNKNOWN' in case of bad applicability query in task config,
if the user has read permission on it. Add tests for the aforementioned
case.

Change-Id: Ibde48bff31ca95f94b95c77880bb3872cf3f0b77
6 files changed