Need to join on revisionDate otherwise one email per Survey revision will be sent. (Added explicit test for this) Some standard template vars were also missing - username and userId. (forward-port from webgui-7.7)