Tim Bresnan and Graeme Swann hit half-centuries to rescue England on the opening day of their Ashes warm-up match against Essex at Chelmsford.