Three men jailed for a bombing have left Thailand after Iran frees a lecturer held on spying charges.