qrlib: improve robustness of getRawData

Fixes assertionError that was thrown when qr Result had more ByteSegments than expected.
This was triggered trying to extract data from QR Result of type URI. I modified this
function to extract the raw byte data only when it has TEXT type and also
make sure to append additional bytesegments together before returning bytes.
qrlib: Try to simplify control flow in saveMessageAndUpdateProgress.

During code review, it was suggested the control flow was confusing
and that we should explore replacing exception based logic
with null. See issue #66.