Pull Request for Issue #8700 - Slight Refactoring of the EC2 Inventory Script

See Discussion in Issue ticket - https://github.com/ansible/ansible/issues/8700.

To recap - This removes any implicit printing, uses the standard pythonic way of making a module runnable, and as such, allows easy re-use of the functionality here by importing this module in another and deriving from EC2Inventory class.