Divide inputs into sets for detecting conflicts during scheduling.

Before input group and multirec support were added, the scheduler
split recording candidates into separate, conflict lists by cardid.
That avoided wasting time checking for conflicts that could never
occur.  It didn't alter the O(n^2) nature of conflict detection, but
it helped to keep n low.  After input group and multirec support were
added, all recording candidates were effectively placed on a single
list because recordings on different cards could now potentially
conflict.

This change restores the practice of putting recording candidates that
can't conflict on separate lists.  Instead of using cardids, however,
the scheduler uses cardids and input groups to split inputs into
mutually exclusive sets where any recording in one set can never
conflict with any recording in another set.
Add mplexid to RecordingInfo for use within the scheduler.

This avoids having to repeatedly query the database when checking for
conflicts between virtual tuners.
Remove debugging from log message in earlier scheduler commit.
improve documentation of the chanid generation scheme

Patch by Robert Kulagowski

Fixes #10779
Merge remote-tracking branch 'upstream/master'
Allocate sufficiently sized buffer for entire segment
including the unencrypted section.

A real bug.  Per the specifications, the AES decryption
will occur only on complete 16 byte blocks, with the
remainder unencrypted.  The codes allocated a buffer
only big enough for the aes encrypted data, and when
it copied the remainder, it overflowed that buffer
(anywhere from 0 to 15 bytes).

Fixes coverity 1023889

(There is some chance coverity will not understand the fix)