Add pig udf to filter on X-CS header, include legacy mode and add unit-tests.