Improve task_lint.sh robustness (#2711)
Improve task_lint.sh robustness (#2711)

* [SCRIPT] Refactor grep for multiple patterns

Tidy up the use of grep.  Use -E rather than run multiple grep
instances.

* [SCRIPT] Refactor grep use in pipeline.

Prefer to use stdin redirection rather than create a pipeline.

* [SCRIPT] Refactor placement and cleanup of temporary files.

Place temporary files in the conventional /tmp location. Avoid
poisoning file name space by using $$. Ensure the temporary files get
cleaned up, even when the script fails / exits early.

* [SCRIPT] Improve robustness of task_lint.sh error handling.

Ensure script failures are caught and propagated.  Rather than trying
to explicitly catch and propagate failures with explicit "|| exit"
annotations, use the "set -e" idom from docker/install scripts and
have the shell catch and propagate errors in the general case and
special case the grep instances where non zero exit is permitted and
should be ignored.

Laurawly/tvm-1,Laurawly/tvm-1,sxjscience/tvm,Huyuwei/tvm,dmlc/tvm,sxjscience/tvm,dmlc/tvm,sxjscience/tvm,Laurawly/tvm-1,dmlc/tvm,sxjscience/tvm,Huyuwei/tvm,sxjscience/tvm,tqchen/tvm,dmlc/tvm,Laurawly/tvm-1,sxjscience/tvm,sxjscience/tvm,Laurawly/tvm-1,Huyuwei/tvm,tqchen/tvm,tqchen/tvm,Huyuwei/tvm,sxjscience/tvm,Laurawly/tvm-1,Laurawly/tvm-1,Laurawly/tvm-1,Laurawly/tvm-1,Huyuwei/tvm,dmlc/tvm,tqchen/tvm,tqchen/tvm,Huyuwei/tvm,tqchen/tvm,sxjscience/tvm,tqchen/tvm,Huyuwei/tvm,dmlc/tvm,Laurawly/tvm-1,dmlc/tvm,Huyuwei/tvm,Huyuwei/tvm,dmlc/tvm,tqchen/tvm,tqchen/tvm,tqchen/tvm,dmlc/tvm