Restart sbt from time to time when publishing

If sbt is not restarted, the JVM will fall back to interpreted mode
after some time. This makes compilation extremely slow.