Losses in plasmonics: from mitigating energy dissipation to embracing loss-enabled functionalities