Use composer for client library

This removes the copied in version of the client library, replaces it with a package in `composer.json`, sets up autoloading, cleans up a few formatting issues, and adds a `.gitignore`.