Simplify compiler code path and add support for sourceRoot.

The sourcemap sourceRoot is a common prefix like a baseURL for the
the filenames in a sourcemap. It allows the map to be more compact by
reducing the number of repeated strings.

Sorting out how to set this was hampered by the compile chain complexity
at the "write" end of the chain. Reducing functions and callbacks makes
things clearer.

Fixes #1324 and fixes #1310 
What if we have a bunch of files spread out in different directories, don't we need to include more than just the file name (relative path to root)