Freeing task metadata on task free.

Properly cleaning up task metadata in restraint_task_free().
This commit also fixes premature free of metadata->name in parse_line().