[WIP] Fixes #3779: Allow console access through the API

For now this is a proposal which works for VNC, but isn't tested for spice.