A finite element model for the nonlinear analysis of reinforced and prestressed masonry