Added functionality to defer audits to the end of the request. This
allows us to aggregate audits within the same request to prevent some
buggy duplications. Adding support for auditing entity attributes as
part of the related entity's audit record requires this functionality.