Allegri signs Milan deal – official