Joint Distillation for Fast Likelihood Evaluation and Sampling in Flow-based Models