[Whitespace] Clean up whitespace in common/typetraits.hh
[Ordering] Fix spurious memory corruption when copying / moving Orderings with delegates

When copying or moving an Ordering with a delegate, the default constructors
incorrectly set the delegate pointer to the address of the child object within
the source object. That can create problems when the source object is later
freed and the memory reused. In that case, the delegate contains invalid data,
and as the only call ever performed through the interface is virtual, there
is a high likelihood of executing arbitrary garbage after the vtable pointer
of the delegate got thrashed.

I really don't know how nobody has stumbled over this one before...
[Typetraits] Add helper function declptr()

The function template declptr() fulfils a role similar to the C++11 function declval().
While the latter returns an rvalue reference to the given type, declptr returns a pointer,
which carries less risk of an implicit instantiation of the parameter type and is backwards
compatible to C++03.

Mostly useful in TypeTree context.
[Ordering] Move LeafGFSLocalOrdering transformation registration to transformations.hh like the rest of them
[Buildsystem] Add tests for decltype and the GCC fallback __typeof__

The TypeTree transformations require either decltype or a compatible
fallback for the descriptor lookup. Up until now, we didn't really test
for that.
[TypeTree] Always transform all children of a PowerNode

The PowerNode transformation algorithm erroneously used the target
node to determine the number of children to transform, which can
pose a problem if the transformation introduced additional nodes
into the tree, changing that number.

Get the information from the source node instead.
[Typetraits] Add new macro DUNE_DECLTYPE for decltype or fall-back mechanism
[TypeTree] Generate pointers in decltype lookup expression with declptr
[Typetraits] Provide is_base_of and conditional in Dune namespace
[TypeTree] Clean up transformation descriptor registration

I had to change the type of the tag parameter for the descriptor registration
function from the type of the tag to a pointer (like the other parameters),
and as that meant having to touch every registration anyway, I also cleaned
up the naming scheme: lookupNodeTransformation() -> registerNodeTransformation(),
because the user is actually registering the transformation by writing the function
declaration.
[Typetraits] Support for conditional evalution of meta functions

Without being able to rely on C++11 template typedefs, meta function
evaluation is explicit and cannot be implicitly deferred to the latest
possible point, creating problems in SFINAE contexts.

This patch adds a little bit of infrastructure to ease dealing with the
associated mess.
[TypeTree] Switch transformation descriptor lookup to DUNE_DECLTYPE macro

This change should make TypeTree more robust - it now works on any compiler that
supports decltype and no longer requires the GCC extension __typeof__ - but it
will fall back to it if decltype is not supported by the compiler. Currently, this
should only happen for GCC 4.2.
[TypeTree] Add support for transformation descriptors that require lazy evaluation
[PartitionInfoProvider] Move PartitionInfoProvider to separate header in common/

It will be used in GridFunctionSpace as well, so better put it into common. Besides,
having it in a separate header also improves discoverability.
[GridFunctionSpace/Ordering] Feed size information from Orderings to GridFunctionSpaces and introduce GFS base class

Disclaimer: This patch has gotten a little big, but it touches too many intertwined
pieces to separate any further...

One important feature of the way the Orderings are created from the GridFunctionSpaces
now is the fact that there should only be a single Ordering tree created from the
root of the GFS tree, reducing the number of template instantiations and thus reducing
compile times. Additionally, this scheme also reduces the number of grid traversals during
function space setup for composite spaces. Unfortunately, these advantage are lost as
soon as the size() method is called on one of the child spaces - that creates a separate
Ordering tree for that child space and immediately traverses the grid to calculate the
size information. The main problem here is the lack of feedback from the Ordering tree
to the GFS tree.

In order to resolve this issue, this patch introduces a very simple, commen base class
for all GridFunctionSpaces that holds size information like the size of the space, the
block count, the global size etc. This information is then updated from the Ordering
tree whenever the Orderings are updated through the GridFunctionSpace interface.

As this change required touching all the relevant methods on the GridFunctionSpaces, I
also went ahead and consolidated as many methods as possible into a new class called
GridFunctionSpaceBase, eliminating quite a bit of duplicate code in the process.

WARNING: This patch is not backwards-compatible in all cases! It is not possible anymore
to call size() or similar global methods directly after constructing a space - doing so
will raise an exception! To avoid the problem call ordering() or update() before size()
et. al.

Some smaller gems in this patch:

- GridFunctionSpace lost a bunch of old variables still left from ancient times
  (before there were Orderings).

- GridFunctionSpaces now track whether they are at the root of the tree.
[GridFunctionSpace] Prevent users from accidentally calling ordering() on child spaces
[Ordering] Switch Ordering lookup to a polymorphic meta function

Up until now, there was only a single  transformation descriptors which
used specialization for the lookup.

In preparation for adding support for decorated OrderingTags, this patch
changes that lookup to happen through a polymorphic meta function like
the general transformation descriptor lookup in TypeTree.
Merge branch 'work'

Some smaller cleanups and bug fixes.

* work:
  [TypeTree] Always transform all children of a PowerNode
  [Ordering] Move LeafGFSLocalOrdering transformation registration to transformations.hh like the rest of them
  [Ordering] Fix spurious memory corruption when copying / moving Orderings with delegates
  [Whitespace] Clean up whitespace in common/typetraits.hh

Conflicts:
	dune/pdelab/ordering/orderingbase.hh
Merge branch 'feature/improve-typetraits'

Several typetraits improvements, mostly for future work on the TypeTree.

* feature/improve-typetraits:
  [Typetraits] Support for conditional evalution of meta functions
  [Typetraits] Provide is_base_of and conditional in Dune namespace
  [Typetraits] Add new macro DUNE_DECLTYPE for decltype or fall-back mechanism
  [Buildsystem] Add tests for decltype and the GCC fallback __typeof__
  [Typetraits] Add helper function declptr()
Merge branch 'feature/various-typetree-improvements'

This branch improves the TypeTree in various ways, making it more robust on
recent compilers and more versatile.

WARNING: It also contains a breaking change for people who have been writing their own
transformation descriptors. The name and signature of the method have changed!

* feature/various-typetree-improvements:
  [TypeTree] Add support for transformation descriptors that require lazy evaluation
  [TypeTree] Switch transformation descriptor lookup to DUNE_DECLTYPE macro
  [TypeTree] Clean up transformation descriptor registration
  [TypeTree] Generate pointers in decltype lookup expression with declptr