A brain-inspired object-based attention network for multiobject recognition and visual reasoning