Changed Scanner interface to have scan modes

A scan mode can be either plain scanning, scanning with online
remediation or offline remediation (without scanning). I chose this
approach because most of the setup code in scanner implementations will
be the same for all 3 scan codes.
Offline remediation support in local scanner, related changes in API
Allow persistent scanners, fixed a segfault after scan finishes

Persistent scanners let us reuse ssh connections so that we can avoid
the user to have to type the password twice.
ssh connection now lives and is reused for subsequent scans

Plus more work regarding scanner thread changes and event loop of it.