Using Repo.aggregate() to count the total of elements is incompatible with group_by().
Changing this to a subquery with a count(*) of results permit to use group_by().
We also try to detect the application actor if it's not given by NodeInfo metadata (FEP-2677)
(guessing for Mobilizon, PeerTube & Mastodon).
Closes#1392
Signed-off-by: Thomas Citharel <tcit@tcit.fr>