A batting masterclass from Mahela Jayawardene helped Sri Lanka keep England at bay on day one of the second Test in Colombo.