Limit analysis for unilateral masonry-like structures