Add support for optional route parameters.

Optional portions of a route are surrounded by parens (eg. "items(/page/:page)").