Nonparametric tests of serial independence