Added classes State and StateStack, identifiers for resources and states, and Foreach.hpp