Allow url objects with signatures compatible with UrlMatcher to be executed from $UrlRouterProvider.when

$StateProvider.registerState allows url objects signature compatible with UrlMatcher to be used, but $UrlRouterProvider explicitly tests to see if the object type is UrlMatcher which means this functionality fails. This commit updates the logic in $UrlRouterProvider to use the same as in $StateProvider.