sch_segment: add missing includes, fixed bugs
add schemaTest
add schema segment as new segment type