Fixes to provenance:
  - Adds used and executed to updateEntity as well
  - Allows used and executed to be list of entities as well as ids
  - Fixes bug when provenance was created causing returned entities to be out of date.