Construction of a p-Adaptive Continuous Residual Distribution Scheme