DAR-1405 Avoiding count on master

* changed the query to only ask for recent revisions
* stored the information that the email was sent to avoid repeating those queries
* added tests for supported cases
* removed unused method from Masthead