This pull request addresses a bunch of regressions introduced with the last

pull request for periodic boundary conditions:

01c69a6 (Matthias Maier, 5 minutes ago)
   Only invert matching direction if absolutely necessary

   Only invert the direction to constrain from face_1 to face_2 when
   absolutely necessary. With this, unnecessary invertions of the
   transformation matrix can be avoided.

   Manually verified that constraint entries (beside direction) do not change.

9616293 (Matthias Maier, 38 minutes ago)
   Bugfix: adjust rotation for inverted matching

   When constraining from face_1 to face_2 we have to use an (orientation,
   flip, rotation) bitset that actually gives the relative orientation of
   face_2 to face_1 (and not as specified face_1 to face_2).

   This worked by accident because the constraining direction face_2 to face_1
   is accidentally almost always used in all test cases.

82a3224 (Matthias Maier, 2 hours ago)
   Use spacedim in compute_transformation instead of incorrect dim

615ce00 (Matthias Maier, 3 hours ago)
   Bugfix: Conditionally use matrix in orthogonal_equality

   Only apply the parameter matrix in orthogonal_equality if it is a spacedim
   x spacedim matrix and can be interpreted as a rotation.

   Further bugfixes and documentation updates.

e672a35 (Matthias Maier, 2 hours ago)
   Code cleanup and several bugfixes

   Refactor the creation of the final (possibly rotated) interpolation matrix
   in make_periodicity_constraints into its own function. Add some additional
   asserts to catch corner cases.

   Return early if nothing to do (fixes dof_tools_21* tests)

b077a4d (Matthias Maier, 2 hours ago)
   restructure and clean up some code