Improve performance by caching wire materials

...ial in the tile entity (will be invalidated automatically if adjacent connections change as a failsafe). This should fix issues when parts of an UE network were chunkloaded, but others weren't (chunks were being loaded just to calculate the resistance of a wire).