dpkg 1.17.21

Version bump, rebased the patch against the latest release and externalizes it, adds some inreplaces discussed with upstream to fix compile issues, and adds a test.
Done already. Was part of the conversation I had with Guillem over the inreplace stuff.