Better method signatures for Routing.

Also, addExtensions() already array_unique()s it. No need to do that twice then.

Refs https://github.com/cakephp/cakephp/pull/3802
Thank you, I added the missing |null part.