The US will withdraw from the treaty underpinning all major international climate agreements and the UN climate science body, according to a White House memo.