Safe haven demand drove up gold and the yen while stocks were pressured after North Korea said it tested a hydrogen bomb.