API: Revamp action=flow

The API is now a modular module, similar to
action=query. This means that each submodule
can properly provide help messages and hints in
the automated API documentation (action=help).

Bug: 57659
Bug: 55862
Change-Id: I09f53f8288ad86fee30dc0a4ce4b9af748aea792