gh-36716: Free space and repeatability for the Docker Hub workflow
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->
This PR implements the suggested changes of
https://github.com/sagemath/sage/pull/36385. Furthermore, it enables the
workflow to detect whether the current tag has already been pushed to
Docker Hub. Thus, if the workflow run on pushing the tag fails due to a
timeout this gives us the possibility to have a scheduler try for a
second or third time (I add a cron for Tuesday and Thursday). Such
timeouts (after 6 hours for a job) seem to happen sporadically, even
though each of the both jobs usually succeeds in less than 4 hours.
I also improve the code structure be refactoring to a reusable workflow
`docker_hub.yml`.
I tested the changes in my fork repository. To prevent from overriding
the existing tags `10.2.rc0` and `develop` I temporarily changed the tag
names to `10.2.rc0t` and `developt` for the test runs. Here is a
[successful run](https://github.com/soehms/sage/actions/runs/6814399805)
that created these tags on Docker Hub. To avoid confusion I've removed
them again. A test-run on existing tags which should skip the subsequent
steps is [this
one](https://github.com/soehms/sage/actions/runs/6828167406).
FYI: I also updated the
[README](https://hub.docker.com/r/sagemath/sagemath) on Docker Hub.
Please have a look and make corrections / additions there if necessary.
### :memo: Checklist
<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->
- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.
### :hourglass: Dependencies
<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
URL: https://github.com/sagemath/sage/pull/36716
Reported by: Sebastian Oehms
Reviewer(s): Matthias Köppe, Sebastian Oehms