[CI] Wrap the build_cmake.sh environment and script path into a function
Summary:
This diff improves readability of the build_cmake.sh call by wrapping it
into a function that extend the cmake flags array and hide the path. It
also makes consistent use of newlines and put options in the first
positions to improve readability. This does not change the behavior.
Depends on D6677.
Test Plan: Run any CI build plan that uses the build_with_cmake function.
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D6678