For some reason I now need to refund the buyer. Do I now first need to transfer all but 0.1 coins to somewhere else, so that I can send the remaining 0.1 coins back?
You make it sound like this is a burden. It seems easy to me, as long as you track taint per-output rather than per address. Just pretend people followed best practices and used a unique address for every output.
So let's take eterm's suggestion that clean coins always come out first. So all we need to do is build a transaction with at least .1 tainted coins, put the non-refund coins as the first output, and put the .1 tainted coins as the second output. First output is an address we control, second output goes back to the person we're refunding.
That's assuming you already mixed up your coins and can't just send back the exact same transaction they sent you in the first place.