autoconf: Sane --enable-debug defaults.
Summary:
Don't optimize at all when --enable-debug is supplied. This makes sure that nothing is optimized out.
Backport of core PR16435:
https://github.com/bitcoin/bitcoin/pull/16435/files
Test Plan:
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug .. ninja check ../configure --enable-debug make check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D4756