Added auto restart support and fix minor installation bug

Added option to restart syncthing automatically in case of shutdown or
crash with limits on the number of crash permitted before to stop the
service
Fix an installation crash that would occur if the syncthing priority was
not set