Financial contagion in banking networks with community structure