Fix track->resource tracking

This should resolve a bug with saving edits to subtitles resulting in a
new resource being created every time.