Stop Cassandra and Postgres after LDAP CI tests (#1332)
## Summary
- Stop Cassandra and PostgreSQL when their LDAP test steps exit,
including when a test fails.
- Free their resources before the Linux replication test. Docker removes
both containers after they stop because they run with `--rm`.
- Stop each container by ID. If Docker confirms that the container is no
longer running, preserve the LDAP step's exit status. If cleanup fails
and the container is still running or its state is unknown, log the
error and fail an otherwise successful step. A failed LDAP step keeps
its original exit code.
## Verification
- All 20 Bash scenarios passed with stubbed Docker and OpenDJ commands.
They cover both databases, failed starts, readiness timeouts, LDAP
failures, automatic removal, and cleanup failures.
- `actionlint`, ShellCheck on the cleanup script, and `git diff --check`
passed. Running ShellCheck across the workflow produced the same
diagnostics as before the change.
- The local Docker daemon was unavailable for a run with real
containers.