Don't draw outside the canvas in pathShadowForUnit

This fixes the Firefox bug. \o/
Slightly better parsing of numbers of players