allyresearch: Simplify logic for display of ally research.
allyresearch: Keep showing allied research even while facilities are upgraded.
allyresearch: Also show in the bottom menu, if allies are researching the same as us.
Fix compile error on *BSD systems.

Patch by brad@comstyle.com.
Fixes ticket:3845.