workaround issue 9634
Issue 10265 - RandomSample fails when passed an InputRange as input

 * Issue fixed by making presence of save() property conditional
   on input being a ForwardRange.
Unittests for randomSample being passed an InputRange.

The assignment of _input = input has been moved from
initialize() to the constructors so as to avoid
problems with nested structs.
Merge pull request #1290 from blackwhale/regex-9634

Workaround issue 9634
Merge pull request #1332 from WebDrake/randomsample-save

Issue 10265 - RandomSample fails when passed an InputRange as input