Remove a few method calls.

These HtmlHelper methods get called frequently enough that the
additional overhead of a few method calls adds up over time.
Call fewer functions when generating routes.

Call str_replace a few times fewer when creating routes. This shaves
a few usec off of a typical request.
Merge pull request #4778 from cakephp/small-optimizations

Small optimizations