Moved rules events definition and configuration into its own module to fix a circular dependency between p2p and p2p default rules.