common: Deepcopy all imported device data

Otherwise a generator can alter the global data and affect other
generators.
Add Element class to generator framework
Add basic Generator class
Start ot make the generator implementation more object orientated
More refactoring