[3.10] bpo-42268: Fail the configure step if the selected compiler doesn't support memory sanitizer (GH-29806) (GH-29815)

(cherry picked from commit e71c12efcddc1076d5367461a5b416092267aa77)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
4 files changed