Matrix spans in max-plus algebra and a graph-theoretic approach to switching max-plus linear systems