fix($urlMatcherFactory): make optional params regex grouping optional

- Previously, the optional parameter's pattern itself was assumed to match 0-length strings
- That did not work if a regexp that was provided for a param required at least one character , ie, [A-Z0-9]{10,16}
- Now, we wrap the pattern group with a question mark if the parameter is optional (pattern)?

Closes #1576