[No compile] Optimized some TakeInventory calls for netplay

Every TakeInventory or GiveInventory call generates net traffic.
Avoiding these calls when they have no actual effect is a Good Idea.
AND THEN THERE WAS CHECKINVENTORY
Don't Repeat Yourself + fixed compile-time error
Marathon weapons now stay dual-wielded through level change
Ranger's weapons now stay on the right ammo mode when switching maps.