dmi_destroy
Description
The dmi_destroy function closes the context if it is open, see
dmi_close, clears its error queue, and frees it along with everything
it holds.
Everything taken from the context refers to freed memory afterwards: its
registry and the structures it holds, the strings and the binary data they
refer to, and the errors taken from its queue. The logging handler given
with dmi_set_logger belongs to the caller, and is left as it is.