A Unified Framework for Understanding and Comparing Dynamic Wage and Price-Setting Models