I've noticed that sometimes dwarves are willing to swing across trees to get to item or the like.
Dwarves use jump/climb pathing in several instances. One particular case is when repathing after a previous path was "blocked" (by another dwarf in a single-tile hallway, perhaps).
However, I also recall mentions that invaders need to see enemies before climbing.
Combat also uses jump/climb pathing, though I doubt it is the only time invaders can climb.
Furthermore, wiki mentions that buildingdestroyers have complete map knowledge on pathing to destructible items.
Maybe. In my experience, non-uninvited-guest building destroyers generally only path to destroyable buildings that are somewhat close by. Uninvited guests, once they "decide to attack", will path into your fortress from all the way across the map.
....The question is thus: Can a Giant Cave Spider climb to go destroy a wooden door only accessible by climbing?
I'm not aware of any research on that.
Will a flier who can climb (I'd guess all of them?) fly out of a hole when pathing to the above?
Flying is another complication. Fliers need to be able to path to distant objectives normally; they then "optimize" the path using flying. For nearby objectives (e.g. a visible enemy) they can usually fly there directly without an alternate path. They can also "wander around" which might allow them to reach areas they wouldn't otherwise path to.