replace, replace_if and tests; fix tests for shuffle and random_shuffle