Wrap the VM app string in a unique_ptr

* Can be safely deleted once it is no more used.
* No copy involved.
* We need to use a raw pointer when starting the thread as
  it is impossible to pass rvalue references.