Changes required to complete a build against Pentaho 5.1 or trunk as requested in #121

Applied Pentaho repository fixes, fixed PostgreSQL dependency and updated project to build against Pentaho 5.1.  The commits are separated so it can be cherry-picked to other branches if you want to build against older versions of OpenERP/Pentaho.