Issue #141: Introduce state system for environment-specific,  non-configuration settings.
Isuse #141: Adding caching to state system.
Issue #141: Clearing cache on state value delete.
Merge branch '1.x' into 141/state_system
Issue #141: state_set() needs to update static states variable if it already exists.
Merge pull request #125 from quicksketch/141/state_system

Issue #141: Introduce state system for environment-specific,  non-configuration settings.