Bp4 doclose fix
Created by: lwan86
fixed the issue that data is flushed twice if deferred variables are not empty when calling DoClose() function and a potential rank 0 early return issue in WriteCollectiveMetadataFile() function
Created by: lwan86
fixed the issue that data is flushed twice if deferred variables are not empty when calling DoClose() function and a potential rank 0 early return issue in WriteCollectiveMetadataFile() function