SCI-1733: IOperator's toString on empty functions causes StringIndexOutOfBoundsException test

This is the trace

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:872)
	at java.lang.StringBuffer.substring(StringBuffer.java:412)
	at uk.ac.diamond.scisoft.analysis.fitting.functions.AOperator.toString(AOperator.java:134)
	at uk.ac.diamond.scisoft.analysis.fitting.functions.OperatorTest.testToString(OperatorTest.java:289)
--snip--
SCI-1733: IOperator's toString on empty functions causes StringIndexOutOfBoundsException fix
SCI-1734: Operators not copying children functions test

CompositeFunction has its own implementation of copy, but the rest
of the IOperator hierarchy does not have one
SCI-1734: Operators not copying children functions fix

Implementation of copy moved from CompositeFunction to AOperator.
Some changes:
- null needs to be handled because some operators (E.g. subtract) can
  have null children functions in reply to getFunctions()
- CompositeFunction's copy maintains its covariant return type
SCI-1735: Operator equality not considering children functions test
SCI-1736: Add/removing functions in Operators does not cause parameters to "bubble" up tests

This commit has three tests which should all be updating the parameters
the CompositeFunction at the root sees. However the order of adding
and removing affects the updating.
SCI-1736: Add/removing functions in Operators does not cause parameters to "bubble" up workaround

This commit provides a workaround for the issue. CompositeFunction (and
AOperator) have a new method called updateAllParameters that should
be called before relying on the parameters returned from getParameters.

A new set of tests replicating the previous commit with the workaround
in the correct place is included.

This workaround has some related issues all tied together in this bug.
1) An additional inclusion is a Null Pointer check in updateParameters().
2) Some new tests demonstrating inconsistency between getNoOfFunctions(),
   getFunctions().length and setFunction() and how they interact with
   the number of parameters being returned.

On review it may be appropriate to add updateAllParameters call to
be done automatically, or fix the issue of being up to date when
the add/remove function operations are done.
SCI-1738: Test for Operator's updateParameters collapses parameters which are equals instead of identical
SCI-1738: Fix for Operator's updateParameters collapses parameters which are equals instead of identical

Note this fix breaks OperatorTest#testConvolve(), however only the test
is broken as the test relied on the incorrect behaviour
SCI-1739: Fix and test for adding name field to fields copied in Parameter copy constructor
Merge branch 'function_fitting'