Hygiene: Standardize spelling of API classes and methods.

Before it was mixed between api/Api and API, even in the same file.
There was also e.g. renderAPI but formatApi.

Since core using Api for API class names and mw.Api on the client,
standardize on that.

Change-Id: I5a316b4c3f1148f1a5dad1e4d731a25f4b162d4c