ENH: Extend scripted module API adding support for cleanup() method
Created by: jcfr
This allows to do some cleanup before a module is effectively unloaded. It is particularly useful to update objects or widgets and avoid memory leaks due to complex interdependencies between C++ application and python layer.