Thread safe geometry hcal tower algo

Forward port of #1647.