Using domain knowledge for robust and generalizable deep learning-based CT-free PET attenuation and scatter correction