[AL] Move vector reservation before for-loop.
[AL] Move implementation details into -impl.h/.cpp files.
[AL] Improve documentation.
Revert "[ML] Const iterator access to mesh's elements."

This reverts commit 10f6593f5bdb13442ec8fff60b712de68777fa0a.
[ML] Use getElements() to access mesh's iterators.
[AL] Move switch-case into element loop.

This results in fastest (in number of read instructions) code.