Chebfun V4 (and earlier) code, kept for posterity.