Haseeb Hameed hit a century for Lancashire against Middlesex while Tom Curran took three wickets to keep Essex in check at the Oval