bibtaskutils: wait_for_task fix

* Fixes wait_for_task() to correctly use bibsched_task_finished API
  thus correctly recognizing finished tasks.

Signed-off-by: Samuele Kaplun <samuele.kaplun@cern.ch>
Merge pull request #61 from kaplun/fix-wait_for_task

bibtaskutils: wait_for_task fix