A) yes, spending 10 days in an amber or green country will mean your time spent in a red country is effectively null and void. Amber would mean a further 10 days home isolation when back in the UK as you say.
B) this is dodgy and I'm not sure where you'd stand....it might be ok if the flight leaves for Portugal a few hours after arrival from Istanbul but I'm really unsure how this would be viewed by the border force. As it would be 2 completely separate flights and not a through ticket then I think you could be liable to being frogmarched to a Government airport hotel at the incredible low price of £1750.
Much better off just going from Turkey to Portugal, just be aware of any possible quarantine or isolation rules for arrivals into Portugal from Turkey.