Smart proxy commands persistence
Right now, we use in-memory persistence to collect the data about the execution. While it works most of the time, sometimes,
one needs to restart the service, which leads to loosing the data.
On the other hand, we should not keep the data for ever
(once they are successfully sent to the server, they should not be needed anymore on the smart proxy. Also, so far we don't clean the working directory on proxy and remote hosts: useful for debugging, but we should handle that for production environments
extracted to #13277