Leptonic unitarity triangles in matter