SoK: A Systems Perspective on Compound AI Threats and Countermeasures