Equilibrium Problems and Limit Analysis of Masonry Beams