Some tidying to the fix class names code

This is just some simple refactoring and optimisation. I did it while investigating https://github.com/QafooLabs/php-refactoring-browser/issues/55 so I could follow the code. Even though the issue eventually turned out to be non-existent I thought I'd submit these changes.

The changes to the test suite only amount to changes in the order as the patches are generated in a different way, the content is still exactly the same. As I said before I think this indicates that a better approach to the tests would be good.

There was also some code in there which "worked around" the previous patch generation code, this was no longer required with the new code.