Deprecate cholpfact and qrpfact and introduce keyword arguments for pivoting. Make thin a keyword argument.

I had to give up on rebasing #4621 and have tried to redo @jiahao's work here.