Make pygame optional

The cgol module can now execute its main logic without Pygame installed.
General source code reorganization