Appeals court reinstates BP shareholders’ lawsuit