refactor tracklist

1. make tracklist more OO
2. remove some global variables
3. fix popup menu in some special scenarios
Merge pull request #93 from EragonJ/refactor/tracklist

refactor tracklist