Migrated dumpstate to C++.

Changes required:

- Explicity casting function pointers.
- Moving variables initialization before 'goto' statements.
- Changing string references from 'char *' to 'const char *'.
- Using 'extern "C"' so device-dependent implementation of
  'dumpstate_board()' can be written in C or C++.

BUG: 25563823

Change-Id: Ibeb70fd23e64e9b530736b554a372cb232fe1a44
5 files changed