Nonlocal Aggregation-Diffusion Equations: entropies, gradient flows, phase transitions and applications