Document "threadFunctionCall" event
Refactor Thread class
Add "threadCreate" event
Use Events class constant instead of raw event name in track.php
Add "default" argument to "Settings::get" method
Fix bug with "Settings::update" method.
Remove Settings::update method

It was too slow
Prevent race condition in old threads closing
Use regular tread save in "Thread::closeOldThreads" method