Object to Array conversion tests

This PR simply introduces two tests to prevent unwanted BC breaks in how objects are converted to arrays.

This (as far as I know) happens in two cases:

 * When explicitly calling `$data = (array) $object;`
 * When using `__sleep`

This PR simply adds tests that verify the keys of the arrays being generated.