Start implementing cgo support

Basics are there, but not fully implemented.
A simple program that refers to a package-local
function in C works.

Also, various fixes.

Fixes #73