Statistical mechanics of small systems