Entanglement entropy and the Berry phase in the solid state