Moved and improve signal.integrate_in_range, fix to gui/tools.Integrate

Moved signal.integrate_in_range to Signal1DTools.
And try to implement in-place substitution in GUI version (currently not
working).