queue, directory: fix reference leaks.

Most of the reference leaks are fixed (I think), but there are
leftovers. Like when delete songs from cue files in playlist.