Gay voters across Europe are abandoning left-wing parties and backing nationalist movements that oppose mass immigration.