VPS: fix track restoration
The media library stores the indexes of the tracks in the respective array instead of the actual PID. So on recovery, we must match the stored index against the array to find-out the actual PID and then request that. The code is changed respectively to do that.
However, the array is constructed after parsing completed, so the entry point for recovery is moved accordingly.
This should fix #1854 (closed)