Improve CC composite error message to support i18n

At present, in CC, there are some of the error messages are composite message
which consist of two parts: general message part and error detail reason part.
For example, Application Invalid message has three kinds of details:

1. Errors::ApiError.new_from_details("AppInvalid", "Number of instances less than 1")
2. Errors::ApiError.new_from_details("AppInvalid", "Invalid app state provided")
3. Errors::ApiError.new_from_details("AppInvalid", e.errors.full_messages)

For this kind of composite message, both the general message part and the detail
reason part need to be translated. Considering the details part is hard coded
in CC code, suggest to enhance the CC code like the following format to support
full i18n:

Errors::ApiError.new_from_details("AppInvalid.invalid_instance_number")

and in the i18n translation file, we can put the full message of AppInvalid error message like:

AppInvalid:
  instances_less_than_1: "The app is invalid: Number of instances less than 1"
  invalid_app_state: "The app is invalid: Invalid app state provided"
  default: "The app is invalid: %s"

In this PR, I just use AppInvlid message as en example, if this solution is
ok for CC, we can use the same solution for other composite error messages
in CC code. Will submit following PRs after this one is accepted and merged.
Merge remote-tracking branch 'origin/pr/292'
Use new i18n error messages.

[#78541378]
Merge remote-tracking branch 'origin/master'
More refactors for EventRepository

- rename methods to use the works 'record' instance of 'create'. We may
need to make special methods for create and delete events; using the
word 'record' will make these new methods less confusing.

- calls to record methods pass a symbol specifying only the action,
  instead of the whole type string
Return proper error codes for deleting service_instances

- 404 when instnace not found
- 403 when user not authorized to delete

This fixes a regression introduced in
3a0590b61f832787dc0eeb19c9407dfcde2a8cc7
Store request_addrs as controller instance variable for service_instance update

This fixes a regression introduced in a recent story
Add audit event when deleting service plan visibilities

[#62604848]

- Replaced event validation of 'presence' with 'not_null' for
actee_name. In cases like service plan visibilities we don't have an
actee name and want that field to be blank.

Conflicts:
	app/repositories/services/event_repository.rb
Prevent moving service instances between spaces
[#84152630]
Add audit events for user_provided_service_instance
Fixed where we record the audit event for delete service plan visibility

- We had been doing it after running or enqueueing (maybe before the job ran).
- Now we do it immediately after the perform (whether it is synchronous or not).
- We're using `successes, failures = Delayed::Job.new.work_off` in our
tests to force the enqueued jobs to run.

[#62604848]
Formatting change
Fix names for service broker examples in events api spec
Fix issue with services event repository
Fix i18n translations when passed an array for the argument
Change StagingError to use default rather than generic

[#84232032]
Check if migrations have been run before loading models

* Prevent cc_worker, cc_clock, and cc_api from starting if migrations
  have not been run yet.

[#82697984]
Revert "Fix i18n translations when passed an array for the argument"

This reverts commit b446e62f92fbb263fa41e5cd594569263d53c67c.
Revert "Use new i18n error messages."

This reverts commit 7da10e379555fb088af16a370d47963718e787df.
Revert "Merge remote-tracking branch 'origin/pr/292'"

This reverts commit b8026921ad01422bf35cb38743e2d98dcf1a6d85, reversing
changes made to d2caa2bdc1fd2929af7ef253706818d3d1379ab1.
bump errors