Factor out restart and interface file generation

This moves the interface file generation into a defined type so that it
can be generically reusable.  For example, this can be used to generate
interface files centrally and distribute them at install time.  The
existing network::interfaces class can still be used and wraps the
defined type.