Use standard Linux macros for P2ROUNDUP and friends.

Aside from reducing code duplication, this should fix bug
zfsonlinux/zfs#2505 by not having the replaced code trigger
PaX's overflow detection.