Diffusion-based Planning with Learned Viability Filters