Surrey seamer Matt Dunn claimed 3-53, including England captain Alastair Cook, as Essex were restricted to 225-6 on day two at The Oval.