observables.density_mode: drop time stamp 'step' in sample

The explicit time stamp will be replaced by halmd::cache.
density_mode: use particle group instead of phase space sample

The density modes are sums over all particles and do not depend on the
particle identity. Operating on the particle group directly avoids
sampling of the phase space arrays, which are sorted by particle ids.

The particle group is passed upon construction, making acquire() a
nullary function (again).
density_mode: clean up

Drop class method wavevector() which is redundant since the wavevector
instance passed upon construction is known to the calling code.

Bind class in Lua sub-namespaces host/gpu, otherwise there is a
potential naming conflict.

GPU implementation:

- Drop deprecated CUDA symbol and pass as kernel parameter instead.

- Use signed integers in CUDA loops, signed comparison is said to be
  faster as overflow is not checked.
density_mode: revise Lua script
observables: revise wavevector module

Change internal data structure: store wavevectors as plain array
(std::vector) and add a list of wavevector shells of approximately equal
magnitude in the form of index ranges into the former array. Thereby,
iteration over the wavevector shells is simplified, e.g., in the ssf
module.

Implementation detail: use std::multimap to group the wavevectors by
their magnitude, but copy to std::vector afterwards.

Drop attribute "dimension".
density_mode: replace complex<T> by fixed_vector<T, 2>

Complex numbers are not natively supported by HDF5. Instead of going
through all the hassles of a custom compound type, we store real and
imaginary parts as the components of a two-dimensional vector.

Mathematically speaking, we exploit the isomorphism between the complex
numbers C and the real plane R².
density_mode: let acquire() observe input caches

Add notes that updates of the result, managed by std::shared_ptr, can be
tracked via std::weak_ptr. This avoids constructions like
halmd::cache<std::shared_ptr<array_type>>.

Let wrap_acquire become a class method named "acquisitor" and bind it to
Lua. Thus, the same member name in C++ and Lua interfaces refers to the
same function, and the acquisitor can be used in C++-based unit tests as
well.

Drop detour via samples::density_mode and store the result as
raw_array<T> directly. This will allow passing the acquisitor to the I/O
writers as well as to the blocking scheme.
io/writers/h5md: support data types shared_ptr<T>
add halmd::owner_equal

Provide owner_equal(a,b) for std::shared_ptr and std::weak_ptr. The
function returns true if the two arguments refer to the same managed
object. It uses the class methods std::{shared,weak}_ptr::owner_before
from the standard library.

Based on http://stackoverflow.com/questions/12301916/equality-compare-stdweak-ptr.
density_mode: add method wavevector()

The method will be useful to test whether two density_mode instances are
compatible.
observables.wavevector: add Lua equality operator __eq(a,b)

The function will be useful to check whether 2 instances of
observables::{host,gpu}::density_mode have been constructed with the
same wavevector instance.
observables.ssf: revise module

Drop time stamp which is replaced by tracking the input sample (managed
by std::shared_ptr) via std::weak_ptr. Since the
observables::{host,gpu}::density_mode class re-assigns the shared_ptr
upon re-computing, the update is detected by a mismatching weak_ptr
derived from the previous input sample.

Pass density mode acquisitors in constructor and make sample() a nullary
function again. The idea behind passing acquisitors instead of instances
of observables::{host,gpu}::density_mode is to disentangle the modules
and relaxes the need for a density_mode base class.

Let wrap_sample become a class method named "sampler" and bind it to
Lua. Thus, the same member name in C++ and Lua interfaces refers to the
same function, and the sampler can be used in C++-based unit tests as
well.