Test for MeshFunction dimension and matching mesh in DirichletBC.

Fixes Issue #221.