wflinfo: Add a --format flag that prints json or the classic output
wflinfo: Add a --format flag that prints json or the classic output

Add a JSON formatted output.

This format doesn't honor the --verbose flag, it always provides all
relevant information.

The option parsing code is a slightly adapted version of code Frank
Henigman wrote.

chadv changes:
  - Fix strtok segfault when glGetString returns NULL on error.
  - Call strtok on copy of GL extension string, as original string is
    const.

Signed-off-by: Dylan Baker <c26a678a04c601e0311b0d6006e67eee6ed19a8e@intel.com>
Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@intel.com>

waffle-gl/waffle,fjhenigman/waffle,waffle-gl/waffle,waffle-gl/waffle,dcbaker/waffle,chadversary/waffle,chadversary/waffle,fjhenigman/waffle,waffle-gl/waffle,chadversary/waffle,dcbaker/waffle,fjhenigman/waffle,dcbaker/waffle