Added untested solution for issue #4

Added SafeThreadExtension class with which you can call any function
without having a problem with objects or functions which aren't
thread-safe