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.
I'm a little uncomfortable with ignoring the return value of `readBits(1)`. If both versions produce the same results, I'd rather vote for 
```
    while (position < dataLength) {
      alignToByte();
      if (!readBits(1)) {
        continue;
      }
      var packet = packetsIterator.nextPacket();
      var layerNumber = packet.layerNumber;
```
because it's closer to the code of the other decoders.