vyos.template: T4333: add Jinja2 plugin to test if a variable is defined and not none
vyos.template: T4333: add Jinja2 plugin to test if a variable is defined and not none

We have a lot of boiler plate template code like

{%   if config.interface is defined and config.interface.remote_as is defined
     and config.interface.remote_as is not none %}
...
{%   endif %}

This can be stripped down using a custom test to:

{%   if config.interface.remote_as is vyos_defined %}
...
{%   endif %}

In addition the new vyos_defined test supports comparison

{%   if foo.bar.baz is vyos_defined('zoo') %}
...
{%   endif %}

So the above will only evaluate to true if the variable foo.bar.baz is defined
and its content is zoo

This is inspired from https://github.com/aristanetworks/ansible-avd/ which make
heavy use of it.

All new templates should be written in this new style.

vyos/vyos-1x,vyos/vyos-1x,vyos/vyos-1x,vyos/vyos-1x