Optimize boundary checks in ihex_byte_copy().

Check if the record's extent overlaps with the target range before
entering the copy loop.  Skip only the first few bytes in case the
target range starts somewhere within the current record instead of
just skipping the whole record.