unit_mex_overdrive.lua: add UnitRulesParam ("gridNumber") for future AI use, and some cleanup

Each pylon will have "gridNumber" rules param. This will help any AI/widget to loop over all pylons to check whether its connected without simulating linking algorithm.

I remember that there's optimization that make mex a pylon (I forgot which ancient commit). While adding the UnitRulesParam() I saw some code that still think mex as non-pylon unit (loops that search which pylon had the mex), so I remove that code and replace with straightforward code that assume mex == pylon (less code). 

Some simple test look okay (based on grid colour & tooltip)