receiver: Optimise a do { ... } while read loop
receiver: Optimise a do { ... } while read loop

In create_image_id() we were reading in the file and hashing it to
create an ID for it by

    while (bytes_read > 0)

An optimisation we can do here is read/hash the file

    while (bytes_read == BUF_SIZE);

This will avoid an extra read of 0 and an extra call to mhash() except
when the file being read is a multiple of BUF_SIZE.

Signed-off-by: Andrew Clayton <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@opentechlabs.co.uk>

ac000/receiptomatic