Use thread pool for rendering.

Please test on large datasets, multiple files, layers, etc.