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.