Create a RedirectListener for AJAX requests.

When submitting from Angular through $http, if the backend sends a redirect, the
page is totally out of control and gets redirected by browser rules. Intercept the
Redirect in Symfony and send them instead as JSON so that angular can intercept it
and work accordingly. (This is buggy now as i havent sent the content length yet for
the JSON response), but this can be made to work.