epg: more robust 32-bit object ID handling

Changes:
  - store the last id number to the epgdb file
    (the purpose is to reuse the id numbers as last as possible)
  - use RB tree to track id numbers (faster lookups)
  - skip invalid zero IDs (++_epg_object_idx)
  - skip used IDs (rare, but possible)

The goal is to handle correctly the 32-bit ID wrapping (++_epg_object_idx).
DVR: entry - fix do not reschedule member typo, fixes #2343