Add support for optional route parameters.

Following Backbone style, optional portions of a route are surrounded by parens (eg. "items(/page/:page)").

`escapeRegExp` and `optionalParam` match what's currently in Backbone master.