A federal judge in Manhattan has sentenced Michael Cohen, the president's former personal attorney, to three years in prison for various crimes.