Speed up construction menu

In the construction menu, highlighting an item will check if the player has the required components to build it (function player_can_build in construction.cpp)
This function is called multiple times, and the inventory is passed by value, causing unnecessary allocation.

Checking with valgrind I managed to get a 3x speedup by passing the inventory as a const reference, from ~10mil instructions per call to ~3mil

Fixes #6923