Fix: libcrmcommon: Rewrite much of parse_op_key.
This function has problems with most operation names that have an
underscore in them, like "migrate_to" or "migrate_from". It parses
those as if the "migrate" is part of the resource name, and "to" or
"from" is the operation name. It does appear to understand _post_notify
and _pre_notify operations, at least.
I've rewritten much of the function to also understand "migrate_to" and
"migrate_from". This is done with a hybrid method. First, the various
operations with an underscore in the name are looked for with a regular
expression. If that fails, we grab the operation and resource by
splitting on underscores.
Additional operation names can be added to the regex if needed.
I'm hoping the rewritten version is a little easier to follow. I have
added a lot of comments to make it easier understand when it needs to be
debugged. There are also test cases.