Initial work on multithreaded rendering.

This is currently disabled for now until more performance testing is
done.