match ammo types when applying inventory templates

uses only weapons that are loaded with the target ammo type
if no weapon is found with the target ammo, but the weapon and the ammo are found separately, unloads the weapon (if necessary), loads the weapon with the target ammo, and uses it
weapons that don't use ammo and weapons with "innate" ammo (like laser weapons) are correctly handled as well

This fixes bug 751 http://openxcom.org/bugs/openxcom/issues/751