Fix check_public_api_headers test on mac os x, and refactor some logic into lldbtest.py
- moved build logic from Makefile and TestPublicAPIHeaders.py into lldbtest to allow reuse
- added decorator @skipIfi386



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