Add multi-threading for C++

If you use `g++`, please add `-std=c++11 -pthread`.

```
g++ -std=c++11 -pthread -O3 rays.cpp
./a.out > rays.ppm
```