Make PlayerHasMarket event-based.
This function is currently polling-based, and called by the GUI on each turn, which results in a big performance hit.
Use the opportunity to rename the set of functions with more generic names.
Reviewed By: Freagarach, wraitii
Differential Revision: https://code.wildfiregames.com/D2919