Re #8943. Changing cast so non-IDataItem things can be exposed.
Re #8943. Adding debug prints that should be removed later.
Re #8943. Exposing IMaskWorkspace to python.