Finite-element analysis of the stress distribution around a pressurized crack in a layered elastic medium: implications for the spacing of fluid-driven joints in bedded sedimentary rock