Ported from ZXing: r2551

Original commit message: "Support GEO, NICKNAME from vCard (add as a
'note' in Android)"
Ported r2561 from ZXing

Original commit message: "On scan we pass a grayscale image of the
scanned image, which is used as a thumbnail. These days this is getting
to be 2MB of data to bundle to copy around in memory. Instead scale by
50% and JPEG-encode. This saves some memory and paves the way for later
perhaps saving the image data with history."
Cleaned up the luminance sources