Banach manifold structure for the space of probability measures and applications to statistical mechanics