A free app claiming it can cure homosexuality has been banned from the iTunes app store after sparking controversy in the US.