Update txt subtitles reading function, move code from src/readsrt.c and src/readtxt.c to src/subtitles.c