Fixed Python 3.7 build errors and some warnings
Summary:
Fixed threads related python build error
Don't treat cast function warnings as errors
Test Plan: Continuous Integration
Reviewers: kislinsk, kalali
Reviewed By: kislinsk
Maniphest Tasks: T26701
Differential Revision: https://phabricator.mitk.org/D216