In SpecWriterCallback.newfile(), when kwarg scan_id=None (the default) and the chosen file already exists, the next scan_id should be determined from the existing file. One of these (perhaps the max of all):
- increment from the last scan number
- increment from the highest scan number in the file
- increment from the total number of scans