Fragment effect: misc fixes and optimizations

- Modify distance while in Preview mode, so that it accurately reflects
the final image (which is almost always bigger than the preview)
- Fix typo on line 335 where R and B were accidentally swapped
- Fix parentheses on final RGB calculation to avoid off-by-one error
(which could cause brightness increase if the fragment count was low).
This also removes the need for "if > 255" checks, as the average value
of (n) pixels can never exceed 255.
- Allow fragment counts of 1, and make distance floating-point.
- Remove second interior loop, and instead keep a running total of RGBA
values.  Big performance gain!
- Negate performance gains by tying the fragment tool into PD's custom
edge-handler and interpolation engine (pdFilterSupport).  Actually, if
the "speed" setting is used, performance gains are still meaningful.  :)
This might be overkill, but I really like providing support for
sub-pixel accuracy when possible, and because this tool accesses
off-image pixels, the edge handling options brings it into line with
PD's other coordinate transform tools.