Trump tangles with judge as NY civil fraud trial nears its end