[DO NOT MERGE] 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.
> > +      a_vars = ALLOWED_VARIABLES.reduce({}) do |mapping, var|
> 
> Why a_vars instead of allowed_variables? :smile: 

I want to have a copy, allowed_variables is already used.

So what folks say? Is this feasible? Or should we rather drop this and
introduce new helper `settings('foreman_url') to read what I need (base
foreman URL in this case).

-- 
Later,
 Lukas #lzap Zapletal