add `opts.compiler` allows third party to override the internal compiler

I read the comments that @lazd made in other posts. Here is my version of rolling out the User custom compiler. 
Let's also pass `compilerOptions` to the custom compiler:

```js
compiled = compiler(contents, compilerOptions);
```