Refactor: libcrmcommon: improve parse_op_key() efficiency
- Check error conditions more strictly
- Allow output variables to be NULL if caller if not interested in them
- Don't over-allocate memory
- Ensure output variables need to be freed only if return value is TRUE