Jaguar Land Rover has announced plans to cut 4,000 jobs globally to reduce costs and compete with Chinese electric carmakers.