Wrap pixRGBRankFilter and fpixGetPixel

Various tweaks to adapt Watershed.lua to work independently (from yflood)