Refactor resolveCoversToReflectionObjects()

I found `resolveCoversToReflectionObjects()` very hard to follow, so I ensured all its cases were tested and refactored.

There is now one block for each case, with the default being the typical "method of a class":
 - Global function
 - Entire class and its ancestors
 - Entire class
 - Methods of a certain visibility
 - Method of a class

- [ ] Would you like me to make each case its own method?