Refactors Element.definitions into a Definitions concern.

This also enables memoization of element definitions. Closes #385 and closes #386