GearSwap: Only call pet_status_change for valid pets.
Ensure pet.status is updated with the new status. It may not have been
updated via refresh_globals().
GearSwap: Revise pet refreshing to account for currently assigned isvalid state.
If the current pet table has a pet index matching the player's pet index, copy
the isvalid state from that rather than forcing it to be true.  This accounts
for when the pet is released and sets isvalid to false, another refresh event
occurs afterwards.  That way we're not left with an orphan 'valid' pet that
doesn't actually exist.
GearSwap: Copy over existing status of a pet table if it's valid and matches the
pet index.  Trust the 0x0E packet handler to update status as it changes, since
it gets handled before the pet table gets updated, usually.
Merge pull request #667 from Kinematics/4.1-dev

Pet validation issues.