Fix object leak in nova.tests.objects.test_fields.TestObject

Call superclass's setUp() before defining new objects so that the object
registry can be saved, and later restored, without the test objects in
it.  This prevents the objects leaking into other tests by way of the
object registry.

Change-Id: If71a055c28c1875e67d826c5c4affda7377d179d
Fix object change detection

The current object change detection actually just hashed the method
argspecs of the remotable decorators instead of the wrapped methods
themselves. This patch fixes that by stashing a pointer to the
original function, which is used for the hash and will be useful
for other inspection-related tasks as well.

This also adds a utility to help when regenerating the hashes,
similar to what we do for API samples. Running the unit tests like
this will give you an object_hashes.txt output file:

  GENERATE_HASHES=y tox TestObjectVersions

Change-Id: Icfe4d6c08f42296c756d1f9ab7c88b52e3209d84
Merge "Fix object leak in nova.tests.objects.test_fields.TestObject"
Merge "Fix object change detection"