Manchester United midfielder Paul Scholes has announced his retirement from football with immediate effect.