Ported r2349 from ZXing

Original commit message: "Issue 1308 allow PDF417 with row height 2"
Ported r2352 from ZXing

Original commit message: "Issue 1312 fix byte mode compaction with early
latch to another compaction"