Cleanup of module detection in client.brain

This should also make it possible to have packages as client modules (making jasperproject/jasper-client#153 obsolete)

I also transformed `Brain.get_modules()` into a classmethod, so that other modules (like `vocabcompiler.py`) can use this in the future.