Integrate AnalysisResult directly into the Phase classes.

All phases return some result. This is useful for unit testing and
dumping a result. There is a subtrait AnalysisPhase which additionally
has a success value. This is for lexical, syntactic and semantic analysis.
The rest of the phases should not be able to fail.
Merge pull request #25 from jspam/014-integrate-analysis-result

Integrate AnalysisResult directly into the Phase classes.