Refactor: libcrmcommon: NULL checks in pcmk__format_option_metadata()
NULL-check type and shortdesc, both of which the standard requires.
Other minor changes:
- Improve resilience by allowing shortdesc to default to longdesc (instead of only vice-versa).
- Use shorter alias variable names for readability.
- Output the default value only if one is defined.
Ref T152
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>