LPS-45722 java.lang.StackOverflowError error is thrown when "layout.friendly.url.page.not.found" is configured with a non existing page

Added following check, in order to avoid redirects to same error page:

```
		if (redirect != null && redirect.equals(request.getRequestURI())) {
			_log.warn("Unable to redirect to: "+redirect+ ", recursive loop");

			redirect = null;
		}
```

Code of method "sendError" is refactored, replacing three "requestDispatcher.forward" code blocks with only one after some variable initializations, allowing the new redirect check.