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.
Fix #910: Add support to export named parameters to JavaScript
Merge pull request #984 from gzm0/improve-publish-script

Restart sbt from time to time when publishing
Merge pull request #983 from gzm0/export-named

Fix #910: Add support to export named parameters to JavaScript