Best type of headphones while riding
I'm not sure there's a best type for cycling, but the latter two examples have their pros and cons and I think you pretty much nailed them.

The last type you posted is going to give you a good snug fit but without the noise isolation of the in ear type (2nd example) which isn't great for listening to music given the wind noise, but for safety reasons is preferable. So if you're riding on public roads and safety is your primary concern, go with the earbud style with the around the ear clip (last example). If you're more concerned about blocking out wind noise and listening to your music the in ear (second example) is the way to go.