Restructure lebesgue() in preparation for adding trig. capabilities.
Restructure lebesgue() in preparation for adding trig. capabilities.

 - Moved input parsing logic into its own function.
 - Added parsing logic to check for a 'trig' flag input and act accordingly.
 - Moved the polynomial Lebesgue code into its own function.
 - Added stubs for the trigonometric Lebesgue routines, to be filled in
   shortly.

alshedivat/chebfun