Enhance vdev layer to maintain logical and physical block sizes

This is a port of the FreeBSD patches:

    * https://github.com/freebsd/freebsd/commit/cfd489a4ed1aa114d31ae863ee02e3d59afb9a14
    * https://github.com/freebsd/freebsd/commit/bd47afb2893407b47a1dc3c9165507d2aa77b5b7

I've only verified it compiles, so it probably still needs some work before landing.