Minor cpp improvements

Fixed a (known) memleak in JPTypeManager and improved  the JPType class, so it does not make unnecessary copies.

I think i've messed up the authors name somehow using eclipse (which uses UTF8 by default). How are the source files (cpp) encoded? Willing to fix this!