Add drush_kill_task() and drush_process_is_active() functions