Three-dimensional imaging of integrated-circuit activity using quantum defects in diamond