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