Smooth switching function with D_MAX

Adding STRETCH flag to switching functions they go smoothly to zero
at D_MAX

Closes #52.
Added regtest for switching function STRETCH
Updated changelog