Error rates of the maximum-likelihood detector for arbitrary constellations: convex/concave behavior and applications