Recording receipts for sent emails

- new receipt table/repo/struct

[#76996006]
Changing upsert to use on duplicate key update

- upsert also no longer returns the item updated as that was not being
  used, this eliminates some queries we had to do.
- on duplicate key update also eliminates a race condition between find
  and update of a receipt

[#76996006]
Refactoring CreateReceipts to not N+1 the database

- removing upsert as it is no longer used