updating _compute_mask_indices fn to work with torch compile
fixes #22849 

The inplace operations are replaced with out-of-place ones to fix the torch compile computational graph breakage.
This method converts the numpy operations to torch operations in _compute_mask_indices function.
The _compute_mask_indices is used when using SpecAugmentation in  wav2vec2 training.

@sanchit-gandhi 
The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_24668). All of your documentation changes will be reflected on that endpoint.<|||||>
> And also add a new test to check that compiling the forward call works when we have spec aug activated

We already have a test case ```test_mask_time_prob_ctc``` that check the forward call with spec aug activated. 
Do you mean when using compile mode - we want to have a test case?<|||||>> Do you mean when using compile mode - we want to have a test case?

Yes please - one test to make sure this PR gives the expected behaviour would be grand!<|||||>I believe we just need an end-to-end test here and then we're good to go right @Kirandevraj?