redirectToRoute() function

Split out previous commit as a new function redirectToRoute($redirect) that handles strings containing either route name or route with parameters.