A high-resolution time-of-flight spectrometer with tracking capabilities for fission fragments and beams of exotic nuclei