dashboard.py: provide state of both port and machine, allow to turn on/off retired machines
Allow to turn ON/OFF a port when it's assigned to a retired machine.
Move to the top the lines with the checks that can be run before accessing to mars_db.
This MR fixes: https://gitlab.freedesktop.org/mupuf/valve-infra/-/issues/124