Fix JavaWebAppWithDslYamlRebindIntegrationTest

- support serialising/deserializing JavaBrooklynClassLoadingContext
  for “common case” of constructing with ManagementContext and no
  custom ClassLoader.
Fixing EntityConfigResource ClassCastException

- BrooklynJacksonSerializerTest failed with ClassCastException in
  EntityConfigResource.getPlain.
- Unclear why it was in that code at all; have added explicit test
  for “Accepts: text/plain”
Fix NodeJsWebAppSimpleIntegrationTest

- Ensure check port availability early, so get nice error message
  for it.
  TODO other entities should probably follow same pattern?!
- copyInstallResources: don’t use env for create-install-dir,
  in case sub-class is setting lots of things or that would
  cause a config value of type attributeWhenReady to be resolved
- Code tidy: Networking.checkPortsValid
Fix MongoDBReplicaSetIntegrationTest

- need to retry addMember/removeMember if first attempt failed
  (e.g. because primary was not yet stable, or attributes of
  primary were temporarily out-of-sync)
- code tidy of MongoDBReplicaSetIntegrationTest
Fix NginxClusterIntegrationTest