added unique constraint on domain.domain
in aggregate reports, group by IP and auth results

(was only IP)

refactored SQL::retrieve_todo