Don't set the mesh dimension based on elements seen.

Instead, set the proper flags in the elems_of_dimension vector.
Add the max_elem_dimension_seen() function and use it to set the
Mesh dimension.

This function should probably be moved to the MeshOutput base class.