Add initial failing unit test demonstrating the problem
SYNC-329 - New sync record incorrectly being created after failure to ingest an invalid sync record.

Add missing call to clear the sync records off of the current thread in the event that an error occurs that rolls back the current transaction.
Merge pull request #20 from openmrs/SYNC-329

Sync 329