lua: fix FTBFS with Boost C++ 1.56

The move constructor of boost::cref has silently been dropped for
compatibility with std::cref:
https://svn.boost.org/trac/boost/ticket/10368

This breaks code such as "cref(v[i])" found in some Lua converters.
Rewrite the for-loops to avoid such constructions.
host/potentials: fix uninitialized memory for cutoff energy

In order to calculate the cutoff energy, the functor of the potential is
being called upon construction of the potential -- but without
initializing en_cut_ properly to zero, causing incorrect cutoff energies
and occasional failings in the tests, e.g.:

http://my.cdash.org/testDetails.php?test=14241015&build=584152
http://my.cdash.org/testDetails.php?test=16653293&build=668443
http://my.cdash.org/testDetails.php?test=16666513&build=668912

All host potentials were affected by this bug, but GPU backends are not
affected, as these initialize the cutoff energy differently.

Fixes #283787