Added cleanup and reset methods to ScriptingCore.
Converted tabs to spaces since that seemed to be the predominant choice in this file.
Merge pull request #2023 from nicolasgramlich/patch-7

fixed #1740: Added cleanup and reset methods to ScriptingCore.