Add a sanity check to the logic gathering the folder tree
Add a sanity check to the logic gathering the folder tree

In case the oc_filecache table would contain some invalid parent references
(i.e. the file index is somehow corrupted), ignore those when building the
folder tree. Previously, such references caused null values to be included in
the result of the REST API method `api/folders`, which prevented the web UI
from showing any folders.

refs https://github.com/owncloud/music/issues/955

paulijar/music,owncloud/music,paulijar/music,owncloud/music,paulijar/music,owncloud/music,owncloud/music,owncloud/music,paulijar/music,paulijar/music