Split pure regex functionality into slre.[ch]

We have to figure out if we want to go with the fossa route of having a single `internal.h` containing all the common headers, in order to ensure having the right order of inclusions etc.