Fix issue with Router trying to URL-decode `undefined` path segments

When Router is dispatching to a route's callbacks, it URL-decodes the matching path segments so that placeholders like `req.foo` don't have encoded values. Since Router supports registering a route as a Regex, when Router executes that regex it may return an array with some undefined matches. This fixes the issue where Router assumed all items in the array returned from `exec()` are strings.

### TODOs

- [x] Update HISTORY.md entry to be more clear and state the original issue.
- [x] Cherry-pick tests from #999.