Allrounder's second first-class century handed Somerset a first innings which Essex have whittled down