Add beforeActive and afterActive to campaigns

Easy enough, just a copy/paste of the logic from whileActive mostly.

Bug: 64685
Change-Id: I28618b2a5edd6d010f3439a3f2379ca035ef8811
(cherry picked from commit b04b4043ad8835a3bcef5ea3cf02445e674762fa)