Dynamic Bank Capital Regulation in Equilibrium