As a pedestrian, I have been hit a couple of times this past year by cyclists. The seem to have a bizarre notion that they can come up behind me at 10+ mph and I will be completely aware of them and their intentions, and then react accordingly. On my bike, I will almost never ride on a sidewalk. but if I do, I will slow down. If there are pedestrians, I would dismount and walk.
In your situation, I would have probably did the same thing. If traffic was severely backed up, I would be a bit nervous about unpredictable frustrated drivers. Best to get in front.
One of the roads I use for commuting has a sidewalk on one side only. The sidewalk has a painted stripe down the center. One side says "Bikes Only". The intent was for this 3 foot wide strip to carry bi-directional bike traffic while keeping the pedestrians safe. Talk about good planning.
-Gary