Removing the factory singleton pattern.

The factory singleton pattern was used to enforce the integrity of the
data model. There are many cases were the structures that enforced this
integrity prevented us from doing what we wanted.
Renamed method.
Added default value to argument.
Using the shape history instead of the old qub_helper module.
Fixed indentation, using 80 columns.
Added variable 'declaration' for clarity.
Fixed indentation.
Fixed spacing.
Using the shape history hardware object instead of the qub_helper module.
Removed unnecessary instantiation.
Using the shape history instead of the qub_helper module.
Fixed logic/inheritance problem

Handling the case of Sample before TaskNode since the Smaple object is also
a TaskNode.
Removed unused variables and adapted the widget to recent changes.
Using the shape history instead of the qub_helper module.
Removed unnecessary object instantiation.
Using TaskGroup instead of the TaskNode base class for groupin tasks.
Using the shape history instead of the qub_helper module.
Using the shape history instead of the qub_helper.
Merge branch 'master' of github.com:mxcube/mxcube