Changes to Pathauto

I've reviewed the current state of the pathauto module. 
As I'm new to D8 development, I did some minor changes I saw during the reading of the code.
We should make sure to backport this change to the D7 version.