installer: Add serial number and /etc/devtab support.
If a disk has a corresponding entry in /dev/serno with identical
major/minor, use that for all further references of the disk in the
installation process.
In the installed system, set up a /etc/devtab entry (with the labels
named disk0, disk1 etc. using the order of the disks appearing in
'sysctl kern.disks' output) and use this label for the system's
/etc/fstab entries.
/boot/loader.conf still has to use /dev/serno for its vfs.root.mountfrom
entry.
The dumpdev entry in /etc/rc.conf could use the devtab label but (as
of this commit) doesn't do so yet. This will be fixed at a later point.
If no /dev/serno is found, or if no corresponding entry in /dev/serno
is found for a specific disk, we use the traditional scheme.
While I'm here, perform some cleanup, namely remove some duplicate
functions.
Requested-by-and-in-discussion-with: dillon