Imported ppcoin support

Imported code from Julian Langschaedel on commit cc107af98b302ae3110625b67f77c88feaeb05f8 to make it work on the current master.

All the tests passes, but I don't know how extensive they are.