Three Iranian men linked to a botched 2012 bomb plot in Bangkok have been released by Thai authorities in exchange for Australian-British academic Kylie Moore-Gilbert, who has been detained in Iran for more than two years.