Export compare_by_dist_to_u to Creature class

And make it more generic by adding the position of g->u as member.
Export code to gather visible monster in range into function.
Make re-targeting on burst fire simpler:

Use player::get_visible_creatures instead of manual iteration, includes npcs.
The function also checks the range and the visibility, so that's not needed later.
Store a temporary value in a variable.
Check for any kind of target before re-targeting.

This includes npcs and even the player itself (think npcs firing).
Remove pointless assignment.