Make GetSecrets do what the spec says

The spec says that if the parameter to GetSecrets is empty,
NetworkManager returns all available secrets. Instead it throws an
exception. I find the intended behaviour more useful, so let's make that
happen.
Firest steps for preprocess: AddConnection

To make it easy to rounf-trip data, we'll preprocess it to do the
inverse of postprocess.
Reduce code duplication