Lifecycle callbacks for documents implementation. 

PrePersist document event implementation.

Resolves #53
+1 for @martiis suggestion