src/plugin.{c,h}: improve VlockPlugin implementation and remove legacy code