add gdb attach process to doc/functional-tests.md
Summary:
Backport of core PR10681
https://github.com/bitcoin/bitcoin/pull/10681/files
Note: I added the comment from laanwj to the doc, I think this is a
better method than running gdb with elevated privileges.
Test Plan: Read it.
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D3370