Misc changes and cleanups.

- Updated some code to c++11 style (e.g. initializer lists).
- Added union and intersection operators to the BBox class.
- Added tests to look for NaN's and Inf's in key places.
- Use std::vector instead of new[] in some places.
- Some non-functional code, beginning of shading system etc.
- Added a Hash class, which is similar to RNG except that it is
  queried with "indices".
Improved Slice class to more automatically work with const data.