Add support for template route matching mode

This commit adds support for template route matching mode.  The user can specify the mode using the service property "matchingMode" on a ResourceProvider.