floating point error bug fix

When sampling a non-uniform int, sometimes the probabilities sum to something
slightly different from 1.0.  If the sum is slightly smaller, and a random
number is used that is greater than the sum (but less than or equal to 1.0),
then the implementation we have been using causes the sampled int to be one
greater than the maximum sensible value, ultimately resulting in a seg fault.
Switching from O3 to O2 optimization.
Adding number of daily exposures to stderr output; whitespace changes
Further floating point error bugfixes

See commit 2c5d36aee60fa1402b63f7f9086143ec85a85c56 for details.  The same
vulnerable algorithm was being used in two other places, so I modified them
the same way.