Refactoring python version check logic
Summary: Python version capture logic is changed to singleton class to avoid global states.
Test Plan: NA
Reviewers: kislinsk, O1 MITK Reviewer Group I
Reviewed By: kislinsk, O1 MITK Reviewer Group I
Differential Revision: https://phabricator.mitk.org/D896