[Tree][Closure] Handle primary key differents types

Hi,

I have a problem with an entity with `TreeListener` (type closure). 

My entity primary key is a custom doctrine type, but the `Closure::processPostPersist` doesn't care. So I modified the behavior to take care about this information.

Let me know if anything looks wrong for you.