add stdin helpers for password input support
Summary:
This helpers will be used for no-echo input when typing passwords in a terminal.
This is a backport of Core PR13716 [1/3]
Commit https://github.com/bitcoin/bitcoin/pull/13716/commits/0da503e9475fea5644168544668581796bf66334
Test Plan: cmake .. -GNinja && ninja
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D8106