Measurement of the $\Xi_b^-$ and $\Omega_b^-$ baryon lifetimes