Update ExtractCallStack.py

Added slight performance improvement to check whether there are any resume or reend statements before formatting the extraction based on resume and reends