This bug was introduced during the json routing rules refactoring.
The global OPTIONS['mail_to'] setting was being modified instead of
using a copy causing every new alert notification to start with the
notification list from the previous notification instead of the
original global settings.
I've also updated the tests to be more resilient to internal
implementation changes and focus on testing the input/output of
the send_email() function. The function now returns the email
message sent and the list of contacts on success or None on failure.