Optimal FRP Reinforcement of Masonry Walls under In- and Out-of-Plane Loads