Geometric Frustration of Jahn-Teller order and ice rules in the infinite-layer lattice