Barack Obama becomes first US president to visit communist state in nine decades amid thaw in relations with Havana.