Function applyRoutingRule

Find the first rule in routingSpec whose pattern matches the current sandboxPath, returning it with the captured params (or undefined).