Small refactors for TorProcess

We could do some small refactors on the TorProcess class:

  • use actual ES private stuff (#)
  • we could move the password hashing in it, since it's used only to start a process
  • we have many calls to this._args.push in two lines: one for the key and one for the value. We could group together, to make them more readable and quicker to understand
  • _torProcessStartTime isn't used (it was intended to be used by TorMonitorService, but it got lost during the rafactor of September)
  • we could export the exit code of the process when it exits
  • onExit and onRestart don't need to be null: they can be empty callbacks, instead
  • we could remove the dependency on TorProtocolService, and take the options in the constructor, instead
Edited by Pier Angelo Vendrame