Amenability and paradoxical decompositions for semigroups and for discrete metric spaces