Brexit may impair UK's capacity to fight terror - expert warns