Add missing extern "C" blocks and move to after headers.

If extern "C" blocks are before external includes, you can end up with broken
interfaces if the external include is doing anything C++ specific.
Move standard includes to before any local includes

This prevents any "side effects" from the internal includes breaking the
standard libraries.
Create explicit names for the typedef anonymous structs
Move typedefs to a seperate file along with forward declarations
Added the new fwd declarations to build rules for installation

Conflicts:
	src/Makefile.in