restructure and clean up some code
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)
Use spacedim in compute_transformation instead of incorrect dim
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.
Also check for reverse matching in bits/dof_tools_21_b

Also check for the inverse matching from face_2 to face_1 in the test
bits/dof_tools_21_b. Both directions must produce the same constraint
matrix except for the ordering of the constraints possibly being swapped.

Manually verified that this is the case
add another version of the dof_tools_21_b

that also tests for correct behaviour with hanging nodes. This is done by
additionally refining the second cube once. Test that constraining face_1
-> face_2 and the opposite direction face_2 -> face_1 give the exact same
result.

Manually verified that this is indeed the case
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.
Avoid unnecessary inversion of a transformation matrix
make astyle happy
code cleanup
Merge pull request #279 from tamiko/fix_periodic_bc

Fix various bugs in periodic boundary conditions