This function must be called when CDM is embeded inside a C/C++
application, and CDM_Initialise has been used to initialise CDM.
This function will free any resources allocated by CDM_Initialise and
will terminate CDM. It is not safe to call any CDM function after
CDM_Finalise has been called. Of course, CDM can be initialised again,
by calling CDM_Initialise.