Addition to pagination page - how to reintroduce query strings into generated paginated links

This one was a head scratcher for me for a bit, hoping to save someone else the grief of figuring it out. I figure query strings as a way of filtering results is fairly common and needs to be persistent from page to page.