Improve crypto support detection and algorithm selection in pytest
This MR ensures that the selected algorithms remains stable throughout the entire test session. Crypto support detection was rewritten to python and simplified.
Prereq !8800 (merged)
Closes #4202
Closes #4422
Related #3810