Resolve a file path name.
Should be NULL (but can also point to a buffer of at least PATH_MAX bytes).
If successful a pointer to the resolved absolute file name, or NULL on failure (with errno set to the error code).
If resolved_name was NULL, the returned result should be freed with mi_free().
Replacement for the standard realpath() such that mi_free() can be used on the returned result (if resolved_name was NULL).