I suppose it's all about 'reasonable force'. If someone attacks you it's ok to use reasonable force to protect yourself but if you rip their head off and s**t down their neck then the authorities aren't going to be too impressed. I think this rule probably applies to getting attacked by dogs too. I've certainly raised a foot in my time when cycling. Are people seriously saying they would rather loose a leg than give a dog a small kick?
I once had a lucky escape when I was chased by a Collie. It decided to bite my back tyre as I desperately cyled away. I turned around to see a yelping dog sailing through the air. Luckily the dog wasn't badly injured.
Cycling away quickly is more likely to end badly I think. If it happened again I would try to slow down and face the attacker with the boot ready if needed.