Recognize gunmods in player::get_weapon_dispersion

If get_weapon_dispersion is called with a gun with an active gunmod, it will use the gunmod item instead of the weapon item.

Also check for curammo being null before using it, just in case (this was the original cause of the bug).

Fixes #10227