Router-related optimizations

An improved version of changes suggesed in PR #1352, and more specifically:

https://github.com/sourcejedi/CodeIgniter/commit/8f7d2dfe42bd8543981c0f295e391e433d82fd42
https://github.com/sourcejedi/CodeIgniter/commit/d2de251c092d9d822fc4898e3681b64e9c74dd2a

(thanks again @sourcejedi)
2 files changed