Fix Issue 10322 - ensure RandomSample is initialized before use

This patch fixes a problem where the public methods .index()
or .popFront() might be called without the first value of the
sample having been determined, which would then cause spurious
results.  The runtime initialization check currently performed
in .front has been extended to those methods.

The private boolean checks in the previous implementation have
been replaced with an enum indicating the algorithm to be used
(A, D or None) with None indicating that the sample has not
been initialized.

Step D1 of Algorithm D has been moved to the skip() function,
which results in a significant performance boost.

Unittests have been introduced to cover the cases where .index
or .popFront() are called before .front.

Finally, the .index method has been made a @property, which I
take to be an oversight of the original code.
Merge pull request #1533 from WebDrake/randomsample-init

Fix Issue 10322 - ensure RandomSample is initialized before use