Invariant polytopes of linear systems