Paul Collingwood scored a timely maiden international century to steer England to a second consecutive victory over Sri Lanka.