Don't restart application when it has crashed more than three times

If we don't limit the number of restarts we will restart it on a continuous crash forever
without stopping it.

Signed-off-by: Simon Busch <morphis@gravedo.de>