[stl-extras] Provide next_or_default and prev_or_default helpers for iterators.
[stl-extras] Provide next_or_default and prev_or_default helpers for iterators.

These work like next_or_end or prev_or_begin, except that instead of forcing the
default value to be the compared against the value, you can specify the value
used upon going out of range.

i.e., instead of:

(x, y) -> (x == y) ? y : std::next(x)

We have:

(x, y, z) -> (x == y) ? z : std::next(x)

This is a strict generalization of next_or_end and prev_or_begin so I
re-implemented both routines in terms of the new routines, so no source needed
to be updated.

karwa/swift,harlanhaskins/swift,austinzheng/swift,swiftix/swift,gribozavr/swift,jckarter/swift,devincoughlin/swift,glessard/swift,ahoppen/swift,shahmishal/swift,lorentey/swift,jmgc/swift,jopamer/swift,sschiau/swift,airspeedswift/swift,uasys/swift,sschiau/swift,roambotics/swift,danielmartin/swift,jopamer/swift,OscarSwanros/swift,tjw/swift,OscarSwanros/swift,benlangmuir/swift,shahmishal/swift,benlangmuir/swift,rudkx/swift,CodaFi/swift,lorentey/swift,alblue/swift,OscarSwanros/swift,gribozavr/swift,hooman/swift,jmgc/swift,parkera/swift,airspeedswift/swift,devincoughlin/swift,atrick/swift,xedin/swift,shajrawi/swift,apple/swift,danielmartin/swift,shahmishal/swift,glessard/swift,harlanhaskins/swift,tjw/swift,glessard/swift,gregomni/swift,gregomni/swift,danielmartin/swift,amraboelela/swift,nathawes/swift,hooman/swift,zisko/swift,airspeedswift/swift,roambotics/swift,austinzheng/swift,ahoppen/swift,shahmishal/swift,JGiola/swift,jopamer/swift,gribozavr/swift,aschwaighofer/swift,devincoughlin/swift,practicalswift/swift,amraboelela/swift,sschiau/swift,jmgc/swift,rudkx/swift,swiftix/swift,CodaFi/swift,CodaFi/swift,CodaFi/swift,xedin/swift,alblue/swift,alblue/swift,ahoppen/swift,alblue/swift,austinzheng/swift,huonw/swift,practicalswift/swift,shajrawi/swift,JGiola/swift,austinzheng/swift,jckarter/swift,zisko/swift,hooman/swift,harlanhaskins/swift,tjw/swift,aschwaighofer/swift,danielmartin/swift,tkremenek/swift,JGiola/swift,shahmishal/swift,devincoughlin/swift,stephentyrone/swift,stephentyrone/swift,nathawes/swift,benlangmuir/swift,gribozavr/swift,brentdax/swift,parkera/swift,ahoppen/swift,stephentyrone/swift,brentdax/swift,airspeedswift/swift,roambotics/swift,lorentey/swift,uasys/swift,jopamer/swift,sschiau/swift,natecook1000/swift,shajrawi/swift,zisko/swift,shajrawi/swift,nathawes/swift,JGiola/swift,jmgc/swift,parkera/swift,aschwaighofer/swift,zisko/swift,rudkx/swift,uasys/swift,shajrawi/swift,frootloops/swift,sschiau/swift,benlangmuir/swift,brentdax/swift,tkremenek/swift,gregomni/swift,apple/swift,aschwaighofer/swift,apple/swift,tkremenek/swift,parkera/swift,nathawes/swift,aschwaighofer/swift,nathawes/swift,sschiau/swift,sschiau/swift,practicalswift/swift,stephentyrone/swift,frootloops/swift,amraboelela/swift,harlanhaskins/swift,tjw/swift,apple/swift,huonw/swift,brentdax/swift,CodaFi/swift,frootloops/swift,uasys/swift,jmgc/swift,devincoughlin/swift,frootloops/swift,atrick/swift,xwu/swift,lorentey/swift,shajrawi/swift,gribozavr/swift,frootloops/swift,jopamer/swift,austinzheng/swift,allevato/swift,jckarter/swift,hooman/swift,tkremenek/swift,stephentyrone/swift,amraboelela/swift,zisko/swift,amraboelela/swift,tkremenek/swift,austinzheng/swift,huonw/swift,zisko/swift,ahoppen/swift,parkera/swift,austinzheng/swift,hooman/swift,xedin/swift,natecook1000/swift,jopamer/swift,OscarSwanros/swift,airspeedswift/swift,jckarter/swift,allevato/swift,swiftix/swift,zisko/swift,roambotics/swift,CodaFi/swift,allevato/swift,devincoughlin/swift,harlanhaskins/swift,uasys/swift,glessard/swift,danielmartin/swift,karwa/swift,allevato/swift,huonw/swift,gribozavr/swift,alblue/swift,ahoppen/swift,parkera/swift,tjw/swift,glessard/swift,karwa/swift,practicalswift/swift,xwu/swift,natecook1000/swift,benlangmuir/swift,jopamer/swift,shahmishal/swift,natecook1000/swift,karwa/swift,OscarSwanros/swift,atrick/swift,benlangmuir/swift,devincoughlin/swift,natecook1000/swift,roambotics/swift,airspeedswift/swift,rudkx/swift,rudkx/swift,practicalswift/swift,karwa/swift,gregomni/swift,xwu/swift,glessard/swift,gribozavr/swift,amraboelela/swift,aschwaighofer/swift,tkremenek/swift,hooman/swift,tjw/swift,xedin/swift,xedin/swift,natecook1000/swift,jckarter/swift,airspeedswift/swift,danielmartin/swift,stephentyrone/swift,practicalswift/swift,apple/swift,aschwaighofer/swift,swiftix/swift,atrick/swift,lorentey/swift,tkremenek/swift,shahmishal/swift,karwa/swift,rudkx/swift,xedin/swift,uasys/swift,stephentyrone/swift,JGiola/swift,jckarter/swift,frootloops/swift,swiftix/swift,practicalswift/swift,shahmishal/swift,lorentey/swift,huonw/swift,atrick/swift,allevato/swift,sschiau/swift,harlanhaskins/swift,OscarSwanros/swift,allevato/swift,CodaFi/swift,brentdax/swift,parkera/swift,huonw/swift,harlanhaskins/swift,hooman/swift,lorentey/swift,nathawes/swift,swiftix/swift,uasys/swift,gregomni/swift,allevato/swift,danielmartin/swift,jmgc/swift,xedin/swift,huonw/swift,gribozavr/swift,roambotics/swift,alblue/swift,shajrawi/swift,parkera/swift,alblue/swift,lorentey/swift,xwu/swift,brentdax/swift,devincoughlin/swift,tjw/swift,natecook1000/swift,amraboelela/swift,karwa/swift,apple/swift,JGiola/swift,xwu/swift,OscarSwanros/swift,practicalswift/swift,gregomni/swift,shajrawi/swift,jmgc/swift,frootloops/swift,xwu/swift,karwa/swift,atrick/swift,brentdax/swift,xwu/swift,xedin/swift,nathawes/swift,jckarter/swift,swiftix/swift