[testing] Add some unit-test for renaming

In particular, test loop behaviour and so fails (#357)
[builder] Pass the name of the robot in the Robot ctor

Avoid to duplicate code, and only set the name if it not None
[builder] Fix handling of loops in builder script

Fix #357
[doc] Describe how to handle loop at the builder level