fix: mark `__main__` as first-party import (#8805)
## Summary
Fixes #8750. `import __main__` is now considered a first-party import,
and is grouped accordingly by the linter and formatter.
## Test Plan
Added a test based off code supplied in the linked issue.