[CI] Add an option to build and run unit tests with debug enabled
Summary:
Calling the script with ENABLE_DEBUG=1 will build and run the unit
tests with debug enabled.
Functional tests are known failing under debug, they will be skipped.
Test Plan:
ENABLE_DEBUG=1 ./contrib/teamcity/build.sh
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: schancel
Differential Revision: https://reviews.bitcoinabc.org/D2776