Fix a chicken and egg require problem.

It raises an exception anytime somebody requires this gem, including its
own tests.  The gem works on some systems and not others because
Dir.each does not have a deterministic order, and we were sensitive to
the order of the requires.

lib/zfs/nvvalue.rb Always require "array" before any of the other files.
Fix "zpool create ... [\"da8\" ... error in tests.

test/test_helper.rb
                Fix return value of available_disks.  Previously, it would
                return something like ["da0", {blah blah blah}], which would be
                passed to the "zpool create" command, causing pool creation to
                fail.  Now it returns a simple array of device names.
Fix pool_teardown failure in functional tests.

test/test_helper.rb
	Fix pool_teardown in the case that the pool creation succeeds,
	but @pool is nil due to a bug in the gem.  Previously,
	pool_teardown would not destroy the pool in that case.
Fix pool creation in test_zfs_property_lookups.

The second functional test would always fail because the first test
would create the global libzfs handle and the second test would not
refresh the handle after creating its pool.

dev_ffi/lib/zfs/global.rb
	Add a ZFS.reopen method that acquires a fresh libZFS handle.

dev_ffi/test/test_helper.rb
	Call ZFS.reopen after creating a new pool.
Fix FS comparison in test_zfs_children_traversal

test_zfs_children_traversal: Don't assume the children list is sorted.
	This could be implemented in ZFS::Dataset#children, but
	consumers of this interface are unlikely to require this, and in
	any case can use Enumerable#sort_by as done in this commit.
Split test_zfs_children_traversal into two tests.

test/functional/zfs_basic_test.rb
	Split test_zfs_children_traversal into two tests.  The new one
	is called "test_refresh_props".  Previously,
	test_zfs_children_traversal was attempting to verify the FS
	topology, but it failed because FS properties (used, available,
	and other usage stats) weren't getting refreshed after a child
	FS was created.  Now, test_zfs_children_traversal only checks
	the FS topology.  It passes, and the new test fails.
Fix test_refresh_props.

lib/zfs/property.rb
	Define a comparison operator for ZFS::Property

lib/zfs/dataset.rb
	Reopen libzfs during Dataset#refresh.  LibZFS fetches FS
	properties from the kernel as part of the handle, IIRC.
Don't segfault on ZFS::Pool.new

lib/zfs/pool.rb
test/functional/zfs_basic_test.rb
	Don't segfault if a user tries to open a pool incorrectly.
	Pools may only be instantiated from ZFS::Pool factory methods.
Add tests for discovering pool topology.

test/test_helper.rb
	Enhance pool_setup to allow it to create different types of
	pool.

test/functional/zfs_basic_test.rb
	Add tests for every basic geometry of pool.  Some fail due to
	unimplemented functionality.
Fix the recently added raidz unit tests.

lib/zfs/device.rb
lib/zfs/pool.rb
	Change the Device.new parameters to prevent repetitive nvlist_t*
	conversions from C to Ruby and back again, which are slow.
	Device.new now takes a native format nvlist_t*

lib/zfs/libzfs.rb
lib/zfs/pool.rb
        Implement Device#name, a wrapper for zpool_vdev_name.

lib/zfs/nvvalue.rb
        Remove tautology

lib/zfs/nvvalue/string.rb
	Add an assertion to help debug a Heisenbug.  I can't reproduce
	it with the ruby debugger, and I can't reproduce it with certain
	puts statements either.  When it inevitably returns, this
	assertion may help.  The original message was:
	FFI::NullPointerError: invalid memory read at
	address=0x00000000000000
Add Zfs::Device#{l2cache,spares}

lib/zfs/device.rb
	Add Device#{l2cache,spares}.  No changes were needed to get the
	list of slogs.

test/functional/zfs_basic_test.rb
test/test_helper.rb
	Add tests for slogs, caches, and spares.
Harmonize Dataset#properties()'s values' types.

lib/zfs/dataset.rb
	In Dataset.properties, every property should have the same
	class: ZFS::Property.  Previous to this change, user properties
	had class String.
Add support for reading feature properties.

lib/zfs/libzfs.rb
lib/zfs/pool.rb
test/functional/zfs_basic_test.rb
	Add support for reading feature properties from pools.
Fix commit 1f35bf0f034ac46711a0670023ad1cccf50cb35a

Like an idiot, I didn't write a test for the user property change I made
in 1f35bf0f034ac46711a0670023ad1cccf50cb35a, and it didn't work.

test/functional/zfs_basic_test.rb
	This time, write the test first.

lib/zfs/dataset.rb
	Fix the type and the source of user properties.
Fix the Heisenbug in the test_strings unit test.

lib/zfs/nvvalue/string.rb
test/unit/nvpair_test.rb
	Fix the Heisenbug in the test_strings unit test.  The mock
	nvpair_value_string method was essentially doing a
	"char **y, **x; y = strcpy(x)" when it should've been doing
	"char **y, **x; y = x".  By chance, it usually worked because x
	didn't have any zero bytes.  Fix it by calling FFI's
	{write,read}_pointer method instead of {write,read}_string when
	mocking nvpair_value_string.
Merge pull request #1 from asomers/master

Sync with Perforce @ 1052625