Explicitly disallow NaN arguments, so we don't explode with ArrayIndexOutOfBoundsException

NaN is sneaky because it is unordered. When it is compared to any number,
the comparison is always false. This circumvents the check whether argument
is within [0..1] and causes the function to explode with
'java.lang.ArrayIndexOutOfBoundsException: -1'.

See Java Language Spec, section 4.2.3:
http://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html
Don't rely on floating point values for array indexes.
Add basic tests for UniformSnapshot#getValue(double) argument validation.
Explicitly disallow NaN arguments in WeightedSnapshot, similarily to commit 00aa2e.
Add basic tests for WeightedSnapshot#getValue(double) argument validation.
Merge pull request #667 from tguzik/bugfix/floating-point-handling-in-UniformSnapshot

Floating point handling in UniformSnapshot