For JPX decoding only read next packet after checking for byte aligning.

This patch makes the image from #5349 appear correctly, however artefacts
for the last packet seem to still be there.
This patch also optimizes some "in-checks" and adds a few header parsings.
This should make the errors more human readable:

```
          default:
            var headerType = String.fromCharCode((tbox >> 24) & 0xFF,
                                                 (tbox >> 16) & 0xFF,
                                                 (tbox >> 8) & 0xFF,
                                                 tbox & 0xFF);
            warn('Unsupported header type ' + tbox + ' (' + headerType + ')');

```