Lift out proof term into a separate module

This should make it easier to experiment with alternative (hopefully
more efficient) representations
Merge branch 'master' of github.com:idris-lang/Idris-dev