CP: t/10370.
Reinitialize widgets after loading snapshot.
Removed obsolete code.
Refack.
Commented out not tested code.
Refack.
Renamed widget attribute name.
Fixed the way how widget definition is registered - clone everything.
Added widget image.