add http REST api; fix container re-up

If a container goes down, a new one with the name
"restarted_$time-<previous name>" is created and started.