Pakistan, UK agree to resolve counter terrorism, immigration issues