packages.mk: move CMake with CUDA patch to 2.8.12.1

The update includes a bug fix that makes the version number of the CUDA
compiler available to CMake scripts.
revise program identification in version output and logger prologue

* decompose Git version string in case of a dirty repository

* output program variants enabled by CMake switches

* output compiler versions and Lua version

* use UTF8 encoding, but store ASCII variant of long program name in
  HDF5 output
fix bug with definition of macro HALMD_WITH_GPU

The macro was originally set in halmd/config.hpp only via #cmakedefine.
Testing the macro in halmd/version.h made it necessary to query the
macro there again. The solution was a bit unfortunate as it always
undefined the macro at the end.

Drop #cmakedefine and define HALMD_WITH_GPU in the CMake files globally,
which appears more robust.

The bug has been introduced in the previous commit.
force_kernel: add variant to make_stress_tensor()

Previously, the elements of the vector have been multiplied by
themselves.
forces: add cubic interpolation scheme

This interpolation scheme is the cubic Hermite interpolation scheme for
two and three dimensions. It will be needed for the future tabulated
force module to interpolate the force and potential from a precalculated
lattice of potential energies (and its derivatives).

It currently supports two precision formats, single and double floating
point precision that should be defined by the user.
interpolation/cubic_hermite: add lua module with documentation

Make the cubic hermite interpolation scheme available from lua and
include the documentation of the scheme.
forces: add tabulated_external module

This module provides the possibility to add an external force by
precalculating the potential on a uniform lattice and then using an
interpolation scheme. If the external potential initially consists of
many particles it should reduce the computational cost of force
calculation.

The interpolation scheme is a functor that will be given as a
template argument to the tabulated_force module -- analogue to the
smoothing functors for pair_trunc. The only example (for now) is the
previously added cubic_hermite interpolation scheme.

Because the shear stress tensor is not interpolated for now, all derived
values (as the shear viscosity) will be incorrect.
tabulated_external: add lua module

Add the documentation and lua binding for the tabulated external force.
lennard_jones: Add higher-order derivatives functions

In order to be able to generate interpolation coefficients for the
interpolation schemes, add the higher-order derivative function.
Add helper module to generate the coefficients for an interpolation scheme

In order to simplify the coefficient generation for the interpolation
schemes, tabulated_generator can generate the lattice with the
interpolation coefficients for a given potential.

Currently, only a host implementation is available. But since this
calculations needs to be done only once and coefficients can be stored
and loaded from a H5MD file, this should not be a bottleneck.
lennard_jones: add tabulated_generator instantiations
Add an example for tabulated_external

This example shows how to make an external potential using the
tabulated_external. The generate_coefficients.lua script generates the
interpolation coefficients and the potential while the
tabulated_external.lua will load these coefficients and simulate the system.
lua: provide offset_to_multi_index() and multi_index_to_offset()

These functions work identically to their C++ counterparts from
utility/multi_index.hpp and provide a mapping from a multi dimensional
index into an offset and vice versa.
numeric/operators: use ceilf()/floorf() when using float
lua/numeric: add numeric.diag() to return diagonal elements in a matrix
lua/trunc/local_r4: add 'precision' parameter

This parameter lets the user set the floating point number precision of
the local smoothing functor. This is necessary in combination with the
'memory' parameter of the other modules.
update CMakeLists, to prevent linking problems
box: add 1-dimensional instantiation
forces/interpolation: add linear interpolation scheme

This is the most simple interpolation scheme, but it can be useful for
simple approximations. The GPU variant may be improved by using the CUDA
functions of linear interpolation.
tabulated_external: Interpolate stress tensor

In order to calculate the potential part of the stress tensor with the
external tabulated force, also calculate the virial at the grid knots
and interpolate the stress tensor with the linear interpolation scheme.