dynamics: add tensor-valued custom correlation functions

In the user script, an additional parameter 'shape' must be given to
specify the extents of the result.

Tensors of general rank are supported by the implementation of
correlation_adapter. The conversion from a nested Lua table to
boost::multi_array of rank > 1 is still lacking, see
halmd/utility/lua/array_converter.hpp.

Move class correlation_adaptor to separate file.