Oil extends gains on robust US demand, China optimism