[1.5] Import portion of patch from issue 297
Run test suite on new datasets
Update issue 297
[1.5] Import patch from trunk to make test passes. Affects:  NR-DEC-2977.pdf.asan.67.2198.jp2-52-decode & NR-DEC-4149.pdf.SIGSEGV.cf7.3501.jp2-50-decode
[1.5] Check the number of tiles
[1.5] Rework r2758 the conditions were not quite right. Update checks.
[1.5] Fix issues with big endian handling
Fixes issue 302
[1.5] Add a way for user to override source/target java version
Update issue 303
[1.5] Create a new cmake option to choose between convienient copy of getopt and system installed one
Udapte issue 301
[1.5] Rework r2768 in fact getopt_long is slightly different on GNU. Adapt signature to handle BSD signature and GNU one.
Update issue 301