Define a new helper function delete_wim_image() and use in
wimlib_delete_image() and in the error path of
wimlib_add_image_multisource().
This fixes a bug: current_image wasn't being reset to WIMLIB_NO_IMAGE in
the error path of wimlib_add_image_multisource(). Bad things would
happen if the library user then continued to use the same WIMStruct.