prepare release 0.40.0
Merge tag '0.40.0'
cleaned up changelog for release 0.40.0