Support save/reload of DataProcessor for unparsing

- Modify the TDMLRunner to serialize/deserialize the DataProcessor for
  unparse tests, mimicking the behavior of parse tests.

- The {next,child}ElementResolver's in ElementRuntimeData must be
  transient/by-name to prevent circular dependencies in OOLAG, since
  these resolvers have pointers to other ElementRuntimeData's. However,
  this also means they must be evaluated in the preSerialize function so
  that their values can be serialized/deserialized correctly, preventing
  a null pointer exception. Add them to the function, and add a comment
  so that hopefully we don't miss any new transients that may be added
  in the future.

- Modify the ResolverType objects to be serializable.

- Modify the NS class to correctly deserialize. Previously, when an NS
  object was deserialized, it had the appropriate code to repopulate the
  NSCache by adding the element to the cache if it did not already
  exist. However, unparsing revealed an error in which we would
  save/reload the unparser in the TDML Runner. In this case, the nsCache
  would not be rebuilt, but deserialization would create new NS objects.
  It would look like the new NS objects were already in the cache, but
  they actually weren't, causing reference equality checks to fail. So,
  instead of using readObject, instead use readResolve(), which allows
  us to change the deserialized objects to use what was in the cache,
  rather than what java deserialization created. This means that all NS
  objects, whether created or deserialized, are always in the NSCache.

DFDL-1332, DFDL-1320
4 files changed