Add preprocess() method to component router interface

This PR replaces #3244 at the request of @Hackwar with just the addition of the `preprocess()` method into the router interface.  I also took motivation from that PR and implemented an `abstract class JComponentRouterBase` which can later house the duplicated code that was trying to be handled in the old PR.