Impact of ion fluxes across thylakoid membranes on photosynthetic electron transport and photoprotection