Contagion and Bank Runs in a Multi-Agent Financial System