Fixed StatelessSession inserting exception and testcase added

Reproducing conditions:
- 'assigned' generator strategy for master entity
- using cache for master entity.

Hibernate had tried to check if identity is transient using cache and fall down due to method getTimestamp() was not implemented for StatelessSession.