Change `_encode_sample` to `encode_sample`

Currently implemented public methods do not support sampling collected transitions by specifying their indices. This is inconvenient for example when we want to sample all collected transitions, because the sample method invokes np.random.randint inside to specify indices to sample, and this makes duplicate samples.

By changing the _encode_sample to encode_sample and specify the indices by user can solve the problem.