It's not far-fetched to see Mallett going to the Texans for a mid-round pick(s), probably conditional on how well he plays. Here's the case from the Texans perspective:
(1)Case Keenum is probably staying as the clipboard holder over T.J. Yates.
(2)They are going to draft a QB, possibly #1, who will be penciled in to the #2 in training camp, and allowed to work his way onto the field.
(3)Schaub is the dead man walking, and he'll get cut no later than after the draft with the post-June 1 designation so as to make his cap hit similar to Hernandez's. ($3.5 million that year, $7 million 2015)
(4)Matt Cassel is kept by the new regime in Minnesota as the only competent QB on the roster. (Goes without saying, but Hoyer is brought back in Cleveland)
(5)Thus, Mallett becomes the most attractive "available" QB with experience with both O'Brien and the system he'll most likely be using in Houston. If traded for, he'll be the tentative #1 in place of Schaub.
My guess would be the 4th rounder this year, plus a conditional mid-round pick the year after, would do it for them.
As for why the Pats might do it: they feel Mallett is gone in a year anyways, compensatory picks are no sure thing and are untradable besides, and they have let UDFA rookies backup Brady before (Hoyer).