Implement storing persistent network configurations.

The API to add persistent networks was added back in r42807 and
r42816 but storing them was still missing.