Add a Cabal library

Moves Core to Idris.Core

The library allows using the Idris' backend from other Haskell code.
For example, we could use Idris as a general TT compiler with multiple
backends:

    run :: Idris ()
    run = do
      let ddir = "libs" -- TODO: Use Idris.Util
      addImportDir $ ddir </> "prelude"
      addImportDir $ ddir </> "base"
      elabPrims
      _ <- loadModule stdout "Builtins"
      _ <- loadModule stdout "Prelude"
      pterm <- fmap (flip delab program) getIState
      elabDecls toplevel [makeDecl pterm]
      compile ViaNode "wow.js" runProgram

Everything but Main, Util, Pkg and Paths_idris is currently exported.
Merge branch 'master' into cabal-library

Conflicts:
	idris.cabal
Move externally useful Util.System functions to IRTS.System

Functions moved:

* getTargetDir
* getCC
* getLibFlags
* getIdrisLibDir
* getIncFlags
* getMvn
* getExecutablePom
Merge branch 'master' into cabal-library

Conflicts:
	src/Idris/DataOpts.hs
Fix LLVM compilation error because of moved `getCC`
Merge branch 'cabal-library' of https://github.com/puffnfresh/Idris-dev into puffnfresh-cabal-library

Conflicts:
	idris.cabal
Change idris.cabal so library only builds once

Though this does mean an up to date cabal is needed!