Minimal prime ideals and cycles in annihilating-ideal graphs