Re: Needn't have done/Didn't have to/Didn't need to.
As an American, I'm not likely to say #1 at all. I'd use #3 to say that I did something that turned out to be unnecessary.
However, I might also use #3 when I didn't do it at all.
A: You're here earlier than you thought you'd be!
B: Yes, it turns out I didn't need/have to stop by the grocery store after all.
I'm not a teacher, but I write for a living. Please don't ask me about 2nd conditionals, but I'm a safe bet for what reads well in (American) English.