Fix playlist "Remove duplicates" function
Multiple things have apparently changed during Qt5 port, and the function didn't work at all. This MR also fixes some TrackPtr comparisons, which are expected to have been broken, but their usage is very limited, and this wasn't actually verified.
Additionally, an earlier bug where duplicate removal didn't work for some specific tracks seems to have been fixed.
BUG: 313791