Following is the text of an EU summit agreement on Thursday giving Britain more time to complete its withdrawal from the European Union.