Fix msh output in FM and MM for Abaqus.

This commit duplicates 298615ed2ff6d040df6ed93fc2cdfae3502b93c2, but now for Abaqus output, i.e.:
When writing a mesh with elements of different dimensions (several of:
0D, 1D, 2D or 3D), the elements of a given dimension were always
numbered from 1, and therefore several elements could have the same id,
which is not allowed. The elements are now numbered contiguously from 1.