JCR-3811 Allow retrying of failed journal entry database inserts.
 - Add a new ResettableTempFileInputStream that is capable of being reset to the beginning of the stream in order to allow re-reading
 - Simplify TempFileInputStream to only be responsible for removing the temporary file when it is closed
 - Fix bug in ConnectionHelper where resources were not cleaned up when a SQL call would fail in batch mode
 - Fix bug in DbDataStore where temporary file was never removed in addRecord

git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/trunk@1625518 13f79535-47bb-0310-9956-ffa450edef68