Turkey has vowed to retaliate against US sanctions imposed over the trial of a US pastor accused of backing terrorism.