cli: Add context manager for ignoring exceptions.
Sync packages.flashmedia with upstream.
stream.hds: Make segment handling more robust.

Also a few minor tweaks.