Convex minorants and the simulation of the extrema of L´evy processes