dpkg: upgrade to 1.17.1 and fix perl scripts

- Upgrade dpkg to 1.17.1 (most recent release, in debian unstable)
- Disable dselect and update-alternatives, as they won't work as intended in homebrew.
- Install dpkg Perl modules to `$(prefix)/perl`, and adjust the shebang on Perl scripts to point there using an existing `do_perl_subst` fn.