Use switching rules defined in OSMF, some code cleanup, etc.

This change enables the emergency rules that HDS streaming uses in OSMF, both of which I think are probably good.  Although in my own testing they didn't appear to make a huge difference.