Fixed #19508 -- Used uri_to_iri.

This is a PR for ticket #19508 for which another PR #2919 was opened by me a few days ago.
This PR implements `uri_to_iri` as per RFC and changes the `PATH_INFO` at the very time when `environ` is being set contrary to the previous one which corrected the received url from `environ`.
Also we have to keep in mind that wsgi settings are set using this..in case of py3 that latin-1 decoding...

Or do you want that this function returns utf-8 decoded n then when I m calling this, I encode it back