After #185537, `lldb-server` would crash with an assertion because it
calls`exit()` instead of returning from `main`. This means that we never
get an opportunity to call `Terminate` before the static
`SystemLifetimeManager` is destroyed.
I could've created a static RAII object to wrap this in (similar to what
Aiden did in #186133) but that's not necessary. I updated the helper
functions to return an `llvm::Error` while `main_gdbserver` and
`main_platform` now return an `int`.
Fixes#186207