EU, UK sign agreement on Gibraltar after 4 years of negotiations