Clang compile fixes

This allows Discount to compile under OS X 10.7 (Lion).

I've also included a .gitignore that ignores various derived files.