Test case and patch for error caused by direct test for numerical equality.
Patched test case for Solaris.
Added correction to ensure unbiasedness of the resampler.
Added various checks for the input. Can be turned of via a parameter.
First CRAN upload.