Latent class inverse probability weighting to estimate causal effects of sequential treatments under unobserved confounding