made thread locking a standalone locking scheme (that does not work for now)
moved and improved benchmark script
made benchmark script fail on failed compilation
moved thread data initialization code (does not work yet)