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.
about which decoder are you talking? when i looked around i found only very unfriendly licensed ones, and I do not want to look at them to avoid polluting pdfjs code with illegal code.
right now I tend to do a skipBits=true before align.
because it makes a hughe difference which I cannot explain right now.