I have no clue what I'd done to wrong him, only thing I can think of was I shook my head at someone playing obnoxiously loud music. I did shout much abuse after his attempts to knock me off my bike, but I wasn't exactly going to thank him.
Well, then, we can assume it was him who was playing the loud music. While loud music can be tedious, especially if it's not the sort of music you like, there are much, much worse things in the world, and your recherche discomfort was only going to last a few seconds. Essentially you went up to a complete stranger who you knew nothing about and by shaking your head, publicly challenged them. Then, when he didn't whimper sorry and immediately turn the music down -- this is what you wanted, isn't it, or why did you shake your head? -- and became aggressive, instead of quickly weighing up the situation and letting him get far away from you as possible, you shouted at him and cycled up to him again. And once again, you ended up out of your depth, but much further in the shit this time as he was actively chasing you, and it was only luck that allowed you to escape. So, what can we learn from this?
And carry a d-lock, but only for locking up your bike. Do not consider it as a weapon, certainly not against a car, as you will only make tiny dents at best, it will still be able to run you over, and having a weapon to hand will probably only make you even more cocky and get you into even more trouble.