Add BI events for tracking email opt-ins

BI tracking of email opt-in and opt-outs, by organization. Segment's [debugger](https://segment.com/edx/lms-dev2/debugger) is down, so I haven't been able to fully verify; I'll do so as soon as it's back up.

@wedaly and @stephensanchez, could you take a quick look at this when you have a moment?

@griffresch, FYI.
Small style nitpick: could you please move this block into a private helper function?