libdvbv5: don't use realloc() inside pat.c
The usage of realloc() inside pat is wrong, as the newly reallocated
data could have a different address, and this is not returned back
to dvb-scan's dvb_read_section_with_id().
While we could do some other tricks to pass the new pointer back,
the entire logic is really not good. Also, the PAT handler uses a
different model than the other tables.
So, change it to use a linked list for the programs. This can, however,
break the API for other applications using it.
Fortunately, the dvb_pat_program_foreach() macro abstracts this
API difference, so, the breakage will not actually happen, if the
other apps use this macro (with is the case of tvdaemon).
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>