Add program object config saving

Move config from Program type to new ProgramConfig type. This is not a
new public API objct type, but just an implementation detail to avoid
a huge program.c file.

Also shorten the name of the program schedule related enums and rename
the program schedule repeat modes.
Simplify error handling logic in network_init
Rework program config setters to rollback to the old config if saving fails
Fix out-of-range buffer access in program_config_set_integer