Make ASTExporter a library

Summary:
Make ASTExporter a library

This diff moves most of the code of ASTExporter to a new header file, so that I call it from other plugins.

Test Plan: make test && make -C clang-ocaml test

Reviewers: irp

Reviewed By: irp

Subscribers: dfechete

Differential Revision: https://phabricator.fb.com/D1591375
Add more "#pragma once"
Silence gzip confirmation message