Add make_boundaries_periodic(...) helper function

Does what it says.

Should work for at least 1D/2D rectangular meshes.

Might work in 3D if ordering of nodes is sensible, if not it can
probably be extended.
Use make_boundaries_periodic in creation of periodic meshes
In wave-like solution handle dimensions properly