hlsstreamhandler: While the remainder should always be zero, don't assume
that it will be.  Also shorten a sleep which was too agressive in some
situations.
Separate M3U parsing so it can be shared between 'recorders' which need it.