Three police officers were assaulted after a man was detained by an online child abuse activist group in Bradford.