Fix dynamic cast between two shared pointers
Before this commit, there would be an incorrect dynamic cast between two shared pointers in KisFavoriteResourceManager. This commit fixes it.