Add frontend alive check to the backend.

Stop the backend if the frontend process does not exist any more and
backend is not a daemon.
Merge remote-tracking branch 'refs/remotes/ivan/feature/add-frontend-alive-check' into develop