Make isnan test properly portable between g++ and nvcc on OS X.
Add a benchmark suite with one histogramming test