Removed dependency to MemoryMeasurer.
It is actually much simpler to serialize the session and measure
serialized size than to use MemoryMeasurer. Dont know why I didnt
implement it this way ...