sel-cache: Register matches before getting logs

The code was getting the log entries first and then register matches.
In case an event occurs and a log entry is created during this time, the
log entry is missed in SELs.

Register matches before getting log entries to make sure all the log
entries could be handled in ipmid.

Tested: Before this change, the BMC boot event is missed in ipmi SEL
        because the event happens to be logged during the ipmid starts.
        With this change, the BMC boot event is shown in ipmi SEL.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I03c587faf7eed5a0390302a90616f133a8303688
1 file changed