check_public_headers.py would fail when reading non-ascii chars on systems where
the default encoding was ascii.
Also fixes error handling issues, as any uncaught exeception would cause the program
to run indefinitely.
Also added a command line option to reduce the analysis to a specific
directory only. This is useful for local execution for checking updated
headers with verbose flag set.
Additional test compiling the header to produce assembly:
- checks if header really compiles (previously validated only by
preprocessor)
- checks that the header produced empty object, no inline code to be
present in public headers
Closes IDF-1324