China has unexpectedly devalued its currency in an attempt to boost exports and revive its economy