"Previous URL" maganement improvement.

This PR improve the management of the previous URL, which is now defined when `KernelEvent::TERMINATE` is fired as the current URL (e.g., `Request::getUri()`), instead of defining it as the referrer when `KernelEvents::REQUEST` occurs.

A new Smarty function is defined, `set_previous_url`, which is used to set the (future) previous URL, or, if the parameter `ignore_current="1"` is specified, to prevent the storage of the current URL as the future previous URL.

This PR addresses the issue #694.