codec/esout: use bitmap for cc channels and refactor channel creation