Fix connection handling with multiple namespaces

When using a serial connection, the connection object in the namespace data is
create by ConnectDevice. In this case, updating or changing it in the next
actions can lead to strange errors.

Also raise a JobError when "connection-namespace" is not pointing to a usable connection.

Signed-off-by: Rémi Duraffort <remi.duraffort@linaro.org>
15 jobs for connection-namespace in 11 minutes and 1 second (queued for 4 seconds)
Status Job ID Name Coverage
  Test
passed #60025
amd64
dispatcher-debian-10

00:03:29

passed #60023
amd64
dispatcher-debian-9

00:03:35

passed #60026
amd64
server-debian-10

00:03:08

passed #60024
amd64
server-debian-9

00:03:25

 
  Analyze
passed #60028
amd64
black

00:00:45

passed #60029
amd64
code_quality

00:00:31

passed #60030
amd64
dockerfiles

00:00:26

passed #60031
amd64
job-schema

00:00:35

passed #60032
amd64
pylint

00:03:04

passed #60027
amd64-dind allowed to fail
sast

00:02:33

 
  Build
passed #60035
amd64
amd64/pkg-debian-10

00:01:44

passed #60034
amd64
amd64/pkg-debian-9

00:02:09

passed #60033
amd64
doc

00:01:54

 
  Docker
passed #60036
amd64-dind
amd64/lava-dispatcher

00:01:11

passed #60037
amd64-dind
amd64/lava-server

00:02:11