Handle shared files properly

* fix path retrieval for toCollection method of album and track
  * use getPath() to resolve fileid
  * use getPath() to resolve cover path by id
* add hook handler for unshare event - deletes track on unshare
* fix unit test
* use of methods instead of key access for metadata