Iran agrees to pardon ‘tens of thousands’ or prisoners