[CI] Improve artifacts management and allow for custom artifact directory
Summary: The current CI builds assume the artifact directory location in a privileged directory. This might be inconvenient if the build is running on an agent that can't create this directory (e.g. teamcity cloud agents).
Test Plan: Run some build with a custom artifact dir.
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D17995