Geometric entanglement in Kitaev's toric code and transition to trivial phase by string tension