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>