Three-dimensional Cosserat homogenization of masonry structures: elasticity