metadata: fix a memory-leak when adding metadata for folders; entry wasn't freed
albumart: fix some memory leak issues (thanks valgrind!)

Also refactor some code slightly, move link_file and copy_file to utils. Also change the resize-albumart functions that take a dst_file as an argument to return 0 (on success) or -1 instead of the dst_file as previously. This solves an ambiguity on whether the two pointers are the same or not.
Merge branch 'nfo_metadata' into features
Merge branch 'multiple_sized_thumbnails' into features