Split segmentation algorithm code from the application

I put all the segmentation algorithm code in a separate file,
AirwaySegmenter.hxx, so it can be called from other applications.