LPS-52026 Create hibernate listener to clear the persistence context on flush
LPS-52026 Register listener in hibernate configuration
LPS-52026 Make clearing on flush optional to avoid flushing when we don't need to
LPS-52026 Apply to staging