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
* add emit of delete hook
* fix unit test
* use of methods instead of key access for metadata