forces: introduce a new model that supports multiple forces

This patch reverts commit bb52a29 partly and creates a new signal
on_force() in the particle module. This signal is used as a
trigger to calculate force updates.

To prevent unnecessary force computations, the force modules
will register themselves to particle:on_prepend_force().
In this step forces will test if their cache is up-to-date
and if not, they signal the particle module if a force
update is required.

This logic adds a (small) overhead when requesting auxiliary
variables or the force itself as every connected force module
has to test whether to update the variables or not.

In order to prevent calculating the force twice — first the force only,
second time with auxiliary variables during sampler:on_sample() —
reintroduce the function particle:aux_enable() to enable
the computation of the auxiliary variables in the next force
computation. For now, this is used in the thermodynamics module
only. More will follow in subsequent commits.
remove locally defined, unused typedefs

Such typedefs are identified by GCC ≥ 4.8.
Update submodule libs/h5xx

* libs/h5xx d80d048...122ba9f:
  > remove locally defined, but unused typedef
halmd::cache: fix uninitialised class member

GCC 4.8.2 issued the following warning:

In file included from .../test/unit/utility/cache.cpp:32:0:
.../halmd/utility/cache.hpp: In member function ‘void observer::test_method()’:
.../halmd/utility/cache.hpp:141:60: warning: ‘position_cache.halmd::cache<void>::initial_’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         return count_.lock() == c.count_ && initial_ == *c.count_;
random: revise singleton module, add logging output

Before, it was not possible to obtain the RNG seed and to restart a
simulation with a certain seed.

Disable default instantiation of RNGs.

Drop the Lua function seed(). There is no point in shadowing the
function of the C++ module and assigning the same seed for host and GPU
instances (they use different RNG algorithms anyway).
doc: fix indentation in mdsim.particle
mdsim.particle: revise logic for update_force()

Rename aux_valid to aux_enabled, which reflects that fact that the
auxiliary variables are enabled for computation. This overlaps with the
meaning of aux_flag which is dropped.

Introduce aux_dirty_ to indicate that the caches for the auxiliary
variables are invalid (dirty). This has been the second meaning of
aux_valid_ in the previous implementation (actually its negation).

Now aux_dirty_ tells if the variables can be used or need an update,
while aux_enabled_ is queried by the force modules whether these
variables shall be computed.

Unify update_force_() and update_aux_() by adding the flag "with_aux" to
update_force_.
packages.mk: Update to Boost 1.55

Drop the patch for Boost.Log which is already included. Fix trailing
whitespace after "\" at the end of lines which caused the patch to fail.
observables/accumulator: avoid repetetive force calculations

Add optional argument aux_enable to observables.utility.accumulator,
which activates the auxiliary force variables before the integration
step. For each particle instance, it connects aux_enable() to
sampler:on_prepare with the same parameters as for on_sample. Thereby,
repetetive force calculations can be avoided.
integrators: add trace log

The trace log should indicate each part of one MD step, which is
particularly important to detect issues with the data-driven approach.
forces: fix issue with check_cache()

Marking the force cache as dirty must be independent of the state of
aux_enable_. In the velocity-Verlet algorithm, the force is read twice: for the
initial positions and for the new positions. The first read uses the result of
the force computation from the previous step, only the second one needs a new
computation. The aux_enable_ flag, however, is set before the first integration
step, but is meant to be active in the last (and only) force update
only.

Here are buggy examples for a "normal" step and a "sampling" step (with
aux_enabled). In step #10, the first force update is unneeded and was
triggered by aux_enabled().

 [TRACE] performing MD step #9
 [TRACE] verlet_nvt_boltzmann: update positions and velocities
 [TRACE] verlet_nvt_boltzmann: update velocities
 [TRACE] request force
 [TRACE] compute maximum squared displacement
 [TRACE] lennard_jones: compute forces

 [TRACE] performing MD step #10
 [TRACE] enable computation of auxiliary variables
 [TRACE] verlet_nvt_boltzmann: update positions and velocities
 [TRACE] request force and auxiliary variables                      <== unneeded
 [TRACE] compute maximum squared displacement
 [TRACE] lennard_jones: compute forces with auxiliary variables
 [TRACE] verlet_nvt_boltzmann: update velocities
 [TRACE] request force
 [TRACE] compute maximum squared displacement
 [TRACE] lennard_jones: compute forces
 [TRACE] accumulator (Averaged total energy): acquire sample
 [WARNING] auxiliary variables inactive in prior force computation, use aux_enable()
 [TRACE] request force and auxiliary variables
 [TRACE] compute maximum squared displacement
 [TRACE] lennard_jones: compute forces with auxiliary variables
 [TRACE] thermodynamics (all): acquire potential energy
 [TRACE] thermodynamics (all): acquire kinetic energy

To summarise, we must ensure that aux_enabled_ is not consumed
prematurely. This reveals an issue with multi-step integrators (which we
don't have yet). NPT integrators (which we will have soon) need the
pressure in both(?) half-steps and should call enable_aux() directly.
Maybe it would be better to connect enable_aux to on_finalize() and drop
sampler:on_prepare().
forces: split runtime profilers with/without aux variables
remove unneeded typedef utility::profiler

The typedef is only used in the following two typedefs, it is not a
template class (thus not requiring typename), and "utility::profiler" is
only slightly longer than "profiler_type".

In halmd/observables, we need to prefix with "halmd::" to avoid
ambiguities with the namespace observables::utility.
remove unneeded typedef logger_type

There is only one logging class, so no need to parametrise. And
"logger_type" is even longer than just "logger".
cmake: add colour diagnostics for clang when invoked from ninja
Fix build error with Clang

/.../src/halmd/mdsim/gpu/binning.hpp:63:42: error: no matching function for call to 'make_shared'
      , std::shared_ptr<logger> logger = std::make_shared<logger>()
                                         ^~~~~~~~~~~~~~~~~~~~~~~~

For similar errors see http://my.cdash.org/viewBuildError.php?buildid=542151

The issue is resolved by prefixing the typename "logger" with its
namespace scope:

find halmd/ -type f | xargs sed -e '/logger =/s/<logger>/<halmd::logger>/g' -i

This regression was introduced in commit:3fea73c.
Update submodule libs/cuda_wrapper

* libs/cuda-wrapper 6f4c477...088a11c (2):
  > texture: replace private reference by pointer
  > cuda_wrapper: disable warning for CUDA 5.5 headers
numeric.blas: disable warning for CUDA 5.5 headers

Clang ≥ 3.3 emits a warning for CUDA 5.5 headers:

    /usr/local/cuda-5.5/include/cuda_runtime.h:225:33: warning: function
    'cudaMallocHost' is not needed and will not be emitted
    [-Wunneeded-internal-declaration]
particle: mark auxiliary variables dirty separately from the force

Introduce a new function to particle mark_aux_dirty() and set
aux_dirty_ = false only in this function, not automatically with a dirty
force. This allows the force modules to inform the particle module about
the auxiliary variables state independently from the force.
force_kernel: add variant to make_stress_tensor()

Previously, the elements of the vector have been multiplied by
themselves.