Fixes #7828 - generic version of foreman_url

DO NOT MERGE

This is just an idea - `foreman_url` can be used now with empty parameter to
retrieve the `foreman_url` address which is useful in the generic PXELinux
template for Discovery. Unfortunately, from the past this actually returns
unattended_url, thus the empty parameter.

It also adds some exceptions on the log (we are eating them) and also refactors
one method to be private one (it should not be used like that since it does not
add allowed helpers/vars for some templates).

Tests will fail, this is for discussion only.