Changes to qtiplot UserFunction to make it work better with Mantid.

Re #7117