bpo-18819: tarfile: only set device fields for device files (GH-18080)

The GNU docs describe the `devmajor` and `devminor` fields of the tar
header struct only in the context of character and block special files,
suggesting that in other cases they are not populated. Typical utilities
behave accordingly; this patch teaches `tarfile` to do the same.
diff --git a/Misc/ACKS b/Misc/ACKS
index 5a77983..9334020 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -286,6 +286,7 @@
 Greg Chapman
 Mitch Chapman
 Matt Chaput
+William Chargin
 Yogesh Chaudhari
 David Chaum
 Nicolas Chauvat