CA-141510: don't copy more BAT entries than actually exist

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CP-9268: print error message when closing the journal fails

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CP-9268: correctly calculate available BAT and BATMAP in journaled resize

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CP-9268: update BATMAP only if it's larger than the existing one

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>