Extract and export doctest.string

It is hard to use a module as a dependency if its interface is built upon the file system.

This PR separates `doctest.string(text, options, callback)` function so that it can be used independently.

```js
> doctest.string('// > 2+2\n// 4')
[ [ true, 4, 4, 2 ] ]
```