Stopping
You never have to do a rolling dismount, and you don't need to drag (or hover) your foot along the ground as you slow down.
You can always come to a stop, then put your foot - or both feet - down and step off.
If you're using your feet as brakes, stop riding until you've fixed the real brakes.
Starting
When you push off, you may have your 2nd foot too close to the bike. So if, like me, you press down on the right pedal to start, with your left foot on the ground, you may need to position your left foot further out to the side. This should mean the bike has a slight lean, which is counteracted by your pushing off.
If you need to, you can hop a couple of times with your 2nd (left in the example above) foot, but this is only really necessary if you're starting out in the wrong gear. It still shouldn't lead to you banging your leg, but it does increase the chances. Remembering to change down a few gears when you stop can avoid that, so you should only really need to push several times on the ground if you've emergency stopped in a high gear, or starting uphill on a singlespeed.
Just riding
You can really reduce the chance of your foot slipping off the pedal to where you can get hit. Keep your feet in a good position with the pedal axle under the ball of your foot, and go over bumps with your weight on your feet rather than your seat to keep them firmly on the pedals. This is easier if you pause pedalling. You can also attach your feet to the pedals in various ways, but at this stage I don't recommend it for you. A good combination of shoes and pedals helps a lot, even without foot retention.
Other occasions
If you have to push the bike, do so with it on your right (to avoid contact with the greasy lumpy drivetrain), and the left pedal at the back.
If you have to carry it, a conventional diamond frame is best carried with your right shoulder under the toptube just forward of the seat tube, and your right hand holding the toptube, just forwards of that. Alternatively you can fold your arm right up and take the weight in your hand, in a very similar position. This allows you to pick the bike up and put it down without stopping walking, if you can lift it one-handed. Your left hand can steady the handlebars, and tilt the bike to avoid low ceilings on stairs.
The only times I've hurt my legs on my pedals enough to remember have been
- Pushing off and dropping off a kerb simultaneously (do one then the other and it's fine).
- Riding over a speed bump no hands in the wet (I think you can see the problem with that idea).
- Learning to ride a unicycle.