Fix handling of impulses in chebfun.minandmax().
Fix handling of impulses in chebfun.minandmax().

The previous code had some weird calls to min() and max() that weren't
doing the right thing.  Hopefully, this is correct now.

alshedivat/chebfun,ilovejs/chebfun,asgeirbirkis/chebfun