Setext headers parsing and config

Fixed setext headers parsing and added configuration which allows
trimming newline characters in chunks.