Re-write map::apply_light_arc to respond to circleLOS option

Fixes #1476
Use sqrt instead of trig_dist, as trig_dist returns int
Stop inverting lightrays in the wrong places in map::apply_light_arc
Fixed trig light arc ends
Merge remote-tracking branch 'atomicdryad/correcting_headlight_mangling' into headlight
Replace OPTIONS[OPT_CIRCLEDIST] with trigdist
Merge remote-tracking branch 'CR/pr/1480' into dda-master