server/transaction: Fix message hash
server/transaction: Fix message hash

Our message hashes used to generate transaction id's for dbus services
have been relying on an invalid cookie when messages don't have cookies
present. This was exposed by 20adbc2d459123772ecd2d17009e1db0dd6314f2
which enabled error handling for message.get_cookie().

In order to generate a hash of the message, we need to consider the type
of message we have. In the context of an sdbusplus server, METHOD_CALL
type messages will always be incoming and sealed. They will always
provide a valid .get_cookie(). Messages of METHOD_RETURN or METHOD_ERROR
will not be sealed, but will always be generated from an incoming
METHOD_CALL. Therefore they will always have a valid
.get_reply_cookie(). SIGNAL type messages will always be outgoing so
they will not have a cookie yet. We will just use a monotonic source for
generating a transaction id for those.

Tested:
    Run through the unit test suite and booted in a romulus virtual
    machine. Ensured that none of the daemons were ABRTing like they
    were with just 20adbc2d459123772ecd2d17009e1db0dd6314f2 applied.

Change-Id: Ic54ae3b3cfa75d2f419579e1cb02f57eacb87c57
Signed-off-by: William A. Kennington III <30fff5198f4d10ca1117e5f3ec82f3b4b8900d81@google.com>

openbmc/sdbusplus,openbmc/sdbusplus,openbmc/sdbusplus,openbmc/sdbusplus