Ported r2550 from ZXing

Original commit message: "Issue 1477 improve multi QR code finder logic"