General tidyups to build system

This PR addresses the various tidy-up related issues by adding header
installation, library versioning and pkg-config support.