Fix functions.py

Content:
* Bugfix in functions._integrate. Using now the integral of interpolate.
* Convention renaming in qmf: avoding the use of builtin name.