utils: Fix direction_from_flag()

A system message can also be one that's received or sent.
So check if a message is system message before checking
if it's received or sent.

Also, update tests
8 jobs for wip/sadiq/fix-message-direction in 12 minutes and 32 seconds
Status Job ID Name Coverage
  Build
passed #304793
librem5
build-debian-gcc-bullseye

00:02:49

passed #304792
librem5
build-debian-gcc-buster

00:02:13

 
  Test
passed #304795
librem5
check-po

00:00:24

passed #304794
librem5
test:debian-gcc

00:01:26

20.1%
 
  Package
passed #304796
librem5
package:deb-debian-buster

00:01:35

passed #304797
librem5:arm64
package:deb-debian-buster:arm64

00:06:22

 
  Test Package
passed #304798
librem5
autopkgtest-debian-buster-package

00:01:51

passed #304799
librem5
lintian-debian-buster-package

00:00:50