CLOUDIFY-2180 Added test that checks esm maintains failed machine state,...

... when the esm itself is restarted