Upstream merge for factoids, fix threaddump for new web.paste function and update test_factoids QPT.