Weakening exports continued to dog the world’s second-largest economy in August but imports were a bright spot.