change argument order for rand! (fix #8246)

The current API is `rand!([rng], [r::Range], A)`. There seems to be an almost consensus (cf. #8246) to put `r::Range` as last argument, and a preference to keep `rng` before `A`, i.e: `rand!([rng], A, [::Range])`. This PR implements this solution, but can easily be changed to `rand!(A, [rng], [::Range])` if a decision is made this way.
Note: `r::Range` is also changed to `r::AbstractArray`, to match `rand`.