[native] Clean up detect_abis.sh
Summary: Relevant Linear issue here. More details in inline comments.
Test Plan: ShellCheck, close reading.
Reviewers: ashoat, atul, karol-bisztyga
Reviewed By: atul
Subscribers: palys-swm, Adrian
Differential Revision: https://phab.comm.dev/D4479