Array descent with test

This pull request includes the test created by frootloops to descend arrays when converting to a hash (updated to work with master as of 29-08-14), as well as the fix in the to_hash method to pass this test.