Removed errant ptm from new density.deriv.basis()
Fixed errant return of P.deriv
Added switch `elastic.max' that uses some heuristics for expanding and
contracting the bounds to improve search... setting this overrides
degree.max and segments.max
After a fair bit of testing setting elastic.diff to 3 and making
elastic.max the default (batch search with decent defaults).