basicfuncs-plus: Split the source into multiple files

For the purpose of better organisation, split the source into multiple
files.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
basicfuncs-plus: Add a $(state) template function

This function can be used to hold global state, and to change it from
within a template function. When used with one argument, it looks up the
var in the global environment. When used with two, it sets the var and
returns the result.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>
basicfuncs-plus: Adds an $(or) template function

The $(or) template function returns the first argument passed to it that
is non-empty.

Signed-off-by: Gergely Nagy <algernon@balabit.hu>