Improve SQL for authentication_failure_counts view

Remove extra SELECT statement by using a GROUP BY aggregate function.