doc(MemoryManagementDomain): Refine doc

- Add @public to the public documentation
- Change the Doxyfile to expand the preprocessor macros for cleaner
  documentation result

Signed-off-by: George Boumis <developer.george.boumis@gmail.com>
fix(alloc): Improve checks to avoid overflow

Document the internal structure.

Document the alloc function and introduce some overflow and limits
checks. For example if the size requested by the application is greater
than SIZE_MAX minus the size the module uses as header then the
allocation fails.

Simplify the switch statement in memory_management_copy() function

Signed-off-by: George Boumis <developer.george.boumis@gmail.com>