Cactus: Refactor handling of commands

Added helper macros to define a command handler, build a command table
in which each element is a pair of the handler and respective command
ID.
Message loop has been refactored to traverse the command table looking
for the ID, and to call the respective command handler.
Available tests have been moved to their own command handler.

Signed-off-by: J-Alves <joao.alves@arm.com>
Change-Id: I38a50a8d47b083c81c21950d98341de660891c61
9 files changed