Add support for custom random number generator to shuffle()

I added support for specifying a custom random generator function to shuffle(). This is useful if you want to make functions that use shuffle testable (by passing in a stable/predictable generator), if you want to have predictable results, ...