Make DefaultDatasetView::rebuild() synchronized

This fixes bugs (in plugins such as CropImage) caaused by multiple parties
running rebuild() simultaneously.