improved the publish button process so it talks to the templates-api and lets the user know what is going on
Merge branch 'master' of github.com:sharelatex/web-sharelatex