merge
Fixed (supposedly) mt_render.c

The logic was buggy: after a thread is finished, it did not wait for all
other threads to finish and started to do the work again. Now all
threads and the main thread wait for the whole work done.