libnm/keyfile: don't parse JSON config in keyfile reader twice

Commit d6ec009a ('team: normalize invalid configuration during
load') let's keyfile reader ignore JSON configs that cannot be parsed.

Keep doing that, but don't parse the JSON twice for that.

Just set the JSON, and if the setting afterwards does not verify, reset
it to NULL. We also get a better error message and in most cases we
don't need to parse twice.
12 jobs for <span class="ref-name">th/libnm-team</span> in 42 minutes and 58 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #313507
allowed to fail
checkpatch

00:00:57

passed #313514
t_debian:9

00:17:42

passed #313516
t_debian:sid

00:13:29

passed #313515
allowed to fail manual
t_debian:testing

00:11:31

passed #313508
t_fedora:28

00:19:49

passed #313509
t_fedora:29

00:26:07

passed #313510
t_fedora:30

00:24:24

passed #313511
allowed to fail manual
t_fedora:rawhide

00:16:48

passed #313512
t_ubuntu:16.04

00:15:06

passed #313513
t_ubuntu:18.04

00:15:57

 
  External
failed NetworkManager test verification

failed NetworkManager test verification

05:41:11