Changed order of tasks within export_to_OpenQuake_CSV for optimisation

Merged Cecilia Nievas requested to merge enhancement/reorder_oq into main

This MR prevents the code from opening the existing file to check the last ID written there if there is no additional data to append to the file. This should save time when the number of buildings in a quadtile (of the kind that the user has selected to export) is zero.

Merge request reports