Fix problem related to Vector3d type.

The previous structure was having a circular dependency
on the declaration of Vector3d.
Vector3d was defined by using a macro provided by fwd.hh,
but instanciated later in the code.
It was intensively used in transform.hh but with the strong
limitation of necessarily being declared before using transform.hh.
This commit implements proper template derivation without the cyclic
dependency.

The problem was uncovered by Andrea Del Prete.
Fix by O. Stasse.