Converts a per-chromosome track to indexed format (track.dat + track.idx).
Details
This function converts a track from the per-chromosome file format to single-file indexed format. The indexed format dramatically reduces file descriptor usage for genomes with many contigs and provides better performance for parallel access.
The function performs the following steps:
Validates that all per-chromosome files have consistent metadata
Creates track.dat by concatenating all per-chromosome files
Creates track.idx with offset/length information for each chromosome
Uses atomic operations (fsync + rename) to ensure data integrity
Removes the old per-chromosome files after successful conversion