Re #8361. Fix memory leak by ensuring temporary array is deleted.
Re #8361. Ensure temporary heap-allocated object is deleted.
Re #8361. Delete instantiator in case of an exception being thrown.

The factory takes ownership of the injected instantiator object so is
responsible for deleting it if an exception is going to be thrown and
the algorithm will not end up being subscribed.
Re #8361. No need to check for a null pointer before calling delete.
Re #8361. Move heap allocation after ParameterReference creation.

The ParameterReference constructor can throw, which was leaking the
new'd double.
Re #8361. Fix memory leaks seen when calling copying a Sample.

The copied Surface objects in the Object were being leaked as it seems
the correct way to fill the surface list is with existing Surface
objects held within the 'TopRule' member.
Re #8361. Suppress a leak in Nexus's house.

This may be a third-party library we are close to, but it's still a
third-party library so we don't want its problems to obscure our own.
Merge remote-tracking branch 'origin/bugfix/8361_api_memory_leaks'