Liverpool are closing in on a deal to sign Spain midfielder Thiago Alcantara from Bayern Munich for £25m.