To Bail-out or to Bail-in? Answers from an Agent-based Model