Enabled robots to be trained on top-level

Can be trained and run on top-level backside (by clicking on backside to
toggle run/stop).
Improved recording of picking up a copy

Of a 'resource' so that the right copy ends up on the robot's 'hand'.
Added debug_id when debugging

To all widgets.
Fixed a bug in robot 'pick up'

Where wrong copy was being referred to.