The luminosity and redshift dependence of quasar clustering