Fix race conditions in _epggrab_ota_finished() and epggrab_mux_next()
cleanup: remove old files.
support: minor aesthetic change.
dvb: fix disabling of bad muxes caused by dodgy hardware/firmware

because some tuners, mostly USB, can result in ioctl() failures due
to inability to communicate with driver and this was not properly
trapped muxes were being disabled.

Better solution is to reject bad muxes being entered in the first
place based on the tuning capability of the device. Ofc if the
tuner fails to report that correctly (probably) we'll still be
buggered.
Fix #1545 - ensure files only created as required in on-demand mode.
dvb: undo mod to frequency range testing and add additional tuning check

The previous check was garbage because for -S adapters the frequency range
reported by the adapter is in local units (i.e. hi/low band taken into
account) and not simple kHz. This makes checking more difficult and while
its possible I think this should be left for dvb rewrite.

Instead I've re-instated the old code, but muxes are only disable if the
return is EINVAL, which should only be returned if the DVB layer decides
the params are out of range.
Fix #1547 - timeshift: do not create directories until needed

This tries to minimise what is written to disk (inc dirs) when
using on-demand mode. This could result in the failure to write
the buffer not being detected till later and not entirely sure
how clients might handle that.
Protect dvr_inotify_init() in the same way as the other dvr_inotify_* functions
Fix #1549 - webui: stop tabs being re-added.
Fix #1517 - escape regexp special chars before adding autorec rule.

This stops autorec rules entered from event failing to detect events.
dvr: stop inotify code asserting, output error instead.
Fix #1550 - dvr: ensure genre is not lost on autorec update
Fix #1524 - webui: ignore mux updates from different adapter.

These were causing the store to be unecessarily reloaded and as a
result the enabled flag would get cleared in the middle of editing.
Fix #339 - added configurable grace period per adapter.
service: added s_is_enabled() function for checking enable chain
Issue #1532 - service: ensure that only fully enabled services are used.

This uses the new s_is_enabled() callback routine to check if the
service chain is completely enabled. For DVB services this will
also check the container mux and adapter.
Fix #1542 - timeshift: stop crash if speed/skip request w/o service

This can happen because XBMC may send requests even though the sub
has not yet started and the relevant links been made.
Fix #1467 - capmt: try to reconnect when oscam was restarted
cwc: Fix Bulcrypt filters.

They are still not 100% optimal but now at least they don't send
lots of unneeded EMMs.
Save channels upon add from web-ui