plugins: add Plugin.restore

the default save_state and load_state methods will now automatically look
after attributes listed in self.restore, removing the need for every plugin
with state information to reimplement this behaviour
plugins/shutdown: use Plugin.restore
plugins/log: use Plugin.restore