Add nrepl-disconnected-hook and disable nrepl when disconnected.