If we have a session object to use, store the current URI
as the previous URI. This is called just prior to sending the
response to the client, and will make it available next request.

This helps provider safer, more reliable previous_url() detection.

@param \CodeIgniter\HTTP\URI $uri