Topological entropy and periods of graph maps