Stream-based text line reader

This PR replaces the file descriptor based reader with the line reader from https://github.com/sshirokov/cgc/

The new reader uses `FILE*`/`fgets` instead of file a hand-rolled buffer to read text lines from disk in the text STL case.