Non-convex Mather's theory and the Conley conjecture on the cotangent bundle of the torus