Permutation-based inference in time series analysis