China stuns markets by devaluing yuan for second day running