Merge changes from PNaCl code review.

* Simple test-and-set framework for emitting a header in the output
  file.

* Remove the unused "Option" arg to emit() routines

* assert(0) --> llvm_unreachable()

* x-macros refactoring for x86-32 emission

* use llvm::array_lengthof() for snprintf() bufsize parameter

* Make TargetContext members private