Core: Fix pet dismiss on phase with update

We noticed that there is a problem with using SetPhaseMask.
It phases the player and updates his field of view before phasing the pets and summons etc.
This causes the pet to dismiss.

The reason I decided this is a bug is  that when you are in phase 3 and phase to phase 1, the pet wont dismiss.
But when phasing from phase 1 to phase 2, the pet dismisses.

This change phases the player, then the pets and then updates the player's field of view if update is  true.