[native] Clean up detect_abis.sh using ShellCheck
Summary: Related Linear issue here. This is part of a set of diffs that will allow ShellCheck to be added to the CI. See inline comments for specific details of the ShellCheck error/warning output.
Test Plan:
ShellCheck
Additionally, this script is run during the Android build so if that workflow continues to pass CI we can reasonably assume that the script continues to work as expected.
Reviewers: atul, jon, tomek, ashoat, karol
Reviewed By: atul, jon, karol
Subscribers: ashoat, adrian
Differential Revision: https://phab.comm.dev/D4717