Only set the seed in random_from_pdf if supplied

Previously, random_from_pdf would always set the seed to None. This made it impossible to reproduce glp_toplogies with a non-None seed, since glp_topology doesn't pass its supplied seed to random_from_pdf.

This fixes that issue (and potentially other similar issues) by only setting the seed in random_from_pdf if it is supplied.