Update React-tools to support transform as object

This change adds an additional function to the exported object to support getting access to the transformed result as an object rather than just a string result - the separate function designed to maintain backwards compatibility. 

This facilitates tools that want the code separate from the sourcemap or anything else as time goes by.
Abstracted out common code into `innerTransform`

As per feedback brought common logic from both `transform` and `transformAsObject` into its own `innerTransform` function.
Refactor transformAsObject to transformWithDetails

This matches current best thinking.
Update sourceMap to return .toJSON() output

This means we get a data object back rather than a SourceMapGenerator
Merge pull request #1783 from avanderhoorn/patch-1

Update React-tools to support transform as object