Supoort mach-o encoded in yaml.

This is the first step in how I plan to get mach-o object files support into 
lld. We need to be able to test the mach-o Reader and Write on systems without 
a mach-o tools. Therefore, we want to support a textual way (YAML) to represent 
mach-o files.

MachONormalizedFile.h defines an in-memory abstraction of the content of mach-o  
files. The in-memory data structures are always native endianess and always
use 64-bit sizes. That internal data structure can then be converted to or
from three different formats: 1) yaml (text) encoded mach-o, 2) binary mach-o
files, 3) lld Atoms.

This patch defines the internal model and uses YAML I/O to implement the 
conversion to and from the model to yaml. The next patch will implement
the conversion from normalized to binary mach-o.

This patch includes unit tests to validate the yaml conversion APIs.


git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192147 91177308-0d34-0410-b5e6-96231b3b80d8
Convert error code structs to scoped enums.

Summary:
The original code with enum "_" is intended to emulate scoped enums.
Now we have real scoped enums, so use it.

Reviewers: Bigcheese

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1852

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192148 91177308-0d34-0410-b5e6-96231b3b80d8
Add comments. Early return.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@192149 91177308-0d34-0410-b5e6-96231b3b80d8