Add support for optional route parameters.

Optional portions of a route are surrounded by parens (eg. "items(/page/:page)").

Fixed to maintain support for `redirectTo` and `reverse`.