blkdev: support blkdev size query on osx

Support OSX, add checks for platform specific headers.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
test: test helper for get_block_device_size

This is the start of a potential unit test for get_block_device_size. An
actual unit test will probably need to be run as root, and either find a
device, have one specified, or create one (e.g. ramdisk)  in a platform
agnostic way. In the mean time, this tool can be run by hand, or called
for a bash script.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Merge pull request #813 from ceph/wip-blkdev

support blkdev size query on osx/freebsd 

Reviewed-by: Sage Weil <sage@inktank.com>