A two-sector implicit contracting model with procyclical quits and involuntary layoffs