Dimensions before fitting container saved

In the JSON and restored when loaded.
Replaced JQuery data with element attribute

JQuery's data primitive wasn't behaving reliably and using element
attribute is simpler. Hopefully this won't interfere with garbage
collection.
Enabled training of a robot as next robot

It finds the context if the robot is trained in the other robot's drop
area for the next the robot to run.
Close buttons are now always on top of widgets

Fixes problem where clicking on the close button opened the backside
instead.