gh-38757: fix the output of method `acyclic_orientations`
This PR fixes the issue with the output of method `acyclic_orientations`
reported in https://ask.sagemath.org/question/79427/the-acyclic-
orientations-function-behaves-unexpectedly/.
Now the method outputs digraphs with the correct orientation of the
arcs.
### :memo: Checklist
<!-- Put an `x` in all the boxes that apply. -->
- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
### :hourglass: Dependencies
<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
URL: https://github.com/sagemath/sage/pull/38757
Reported by: David Coudert
Reviewer(s): Dima Pasechnik