A tidy-up of mesh.py
Meshes now keep track of their boundaries.