segment: implement wrap around

Provide a way to wrap around the segment index so pseudostreaming
live through a web server and html5 browser is simpler.

Also ensure that 0 (disable) is a valid value across the options
providing wrap around.
