[trunk] prevent overflow in j2k.c

Update issue 392

Issue left open to solve problem on x64-Asan and to investigate Matthieu's suggestion
[trunk] add a check on precinct size (fixes issue 420)
[trunk] fixed a bug that was preventing image with per channel alpha to decode properly (fixes issue 414)
[trunk] fixed a bug preventing palette image with cdef to decode properly (fixes issue 412)
[trunk] add a cdef box when alpha component is present (fixes issue 416)
[trunk] significantly reduces memory for single tile RGB encoding (fixes
issue 375)