Britain, Nigeria sign pact to counter extremism